Přeskočit na obsah

Tato stránka byla automaticky přeložena z angličtiny, jediného jazyka, ve kterém se tento web píše. Číst originál.

mesh.build_cache.key

Every lockfile the repository tracks — Cargo.lock, mix.lock, package-lock.json — as the thing it makes cacheable (a cargo build directory, mix dependencies, npm node_modules), each with its key: a schema version, the platform (the toolchain's own host triple, or `any` for platform-independent source), the toolchain as its executables state it, and the digest of every input and environment variable that changes what the install leaves. Where the entry is restored to is a separate field, so two checkouts with one lockfile share one entry. A kind whose toolchain is absent says why and has no key (ADR 0157, I3950).

Every lockfile the repository tracks — Cargo.lock, mix.lock, package-lock.json — as the thing it makes cacheable (a cargo build directory, mix dependencies, npm node_modules), each with its key: a schema version, the platform (the toolchain's own host triple, or `any` for platform-independent source), the toolchain as its executables state it, and the digest of every input and environment variable that changes what the install leaves. Where the entry is restored to is a separate field, so two checkouts with one lockfile share one entry. A kind whose toolchain is absent says why and has no key (ADR 0157, I3950).

  • query
  • experimentální
  • modul mesh
  • #mesh
  • #build
  • #cache

Zpřístupnění

Kde je tato jedna definice dosažitelná. Absence je explicitní: povrch, který není uveden, ji nenese.

povrchjako
MCPtool majordomus_mesh_build_cache_key
HTTPGET /api/v1/mesh/build-cache/key operationId mesh.build_cache.key
příkazová řádkamajordomus mesh build-cache key

Schémata

Kanonický vstup a výstup z typů Rustu; schéma nástroje MCP a parametry a odpovědi OpenAPI se odvozují z nich.

input · BuildCacheKeyInput

Vstup mesh.build_cache.key.
vlastnosttyppovinnépopis
druh jedno ze 2 ne Only this kind; every kind the repository has when absent.
JSON Schema
{
  "$defs": {
    "Kind": {
      "description": "What is cached: the thing a lockfile makes reusable, named by the directory an install or\na build fills. The word is part of every key, so two kinds never share an entry.\n\n```\nuse majordomus_cli::mesh::build_cache::key::Kind;\nassert_eq!(Kind::NpmModules.as_str(), \"npm-modules\");\nassert_eq!(Kind::parse(\"mix-deps\"), Some(Kind::MixDeps));\n```",
      "oneOf": [
        {
          "const": "cargo-build-dir",
          "description": "The cargo build directory of a workspace: the dependencies compiled on the way, without\nincremental state. Restored only into a directory that is cold.",
          "type": "string"
        },
        {
          "const": "mix-deps",
          "description": "The `deps/` directory `mix deps.get` fills.",
          "type": "string"
        },
        {
          "const": "npm-modules",
          "description": "The `node_modules/` directory `npm ci` fills.",
          "type": "string"
        }
      ]
    }
  },
  "additionalProperties": false,
  "description": "The input of `mesh.build_cache.key`.",
  "properties": {
    "kind": {
      "anyOf": [
        {
          "$ref": "#/$defs/Kind"
        },
        {
          "type": "null"
        }
      ],
      "description": "Only this kind; every kind the repository has when absent."
    }
  },
  "title": "BuildCacheKeyInput",
  "type": "object"
}

output · BuildCacheKeyReport

Every cached thing a repository has, as cache.key answers it.

use majordomus_cli::mesh::build_cache::key::KeyReport;
let r = KeyReport { platform: "x86_64-unknown-linux-gnu".into(), kinds: vec![] };
assert!(r.kinds.is_empty());
vlastnosttyppovinnépopis
kinds array ano One entry per lockfile the repository tracks, by kind then directory.
platforma string ano This machine's platform triple.
JSON Schema
{
  "$defs": {
    "BuildCacheKindKey": {
      "description": "One cached thing of a repository, with its key or the reason it has none.\n\n```\nuse majordomus_cli::mesh::build_cache::key::{Kind, KindKey};\nlet k = KindKey {\n    kind: Kind::NpmModules,\n    dir: \"site\".into(),\n    location: \"site/node_modules\".into(),\n    platform: \"aarch64-apple-darwin\".into(),\n    toolchain: Some(\"node-24.8.0-npm-11\".into()),\n    inputs: vec![\"site/package-lock.json\".into()],\n    digest: \"0\".repeat(32),\n    key: Some(format!(\"v1/npm-modules/aarch64-apple-darwin/node-24.8.0-npm-11/{}\", \"0\".repeat(32))),\n    unavailable: None,\n};\nassert!(k.key.unwrap().starts_with(\"v1/npm-modules/\"));\n```",
      "properties": {
        "digest": {
          "description": "The first 32 hex digits of the SHA-256 over the inputs and the declared environment.",
          "type": "string"
        },
        "dir": {
          "description": "The directory holding the lockfile, relative to the repository root (`.` for the root).",
          "type": "string"
        },
        "inputs": {
          "description": "The files hashed into the digest, relative to the repository root.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "key": {
          "description": "`v1/<kind>/<platform>/<toolchain>/<digest>`; absent when the toolchain is.",
          "type": [
            "string",
            "null"
          ]
        },
        "kind": {
          "$ref": "#/$defs/Kind",
          "description": "What is cached."
        },
        "location": {
          "description": "Where the entry is restored to: relative to the repository, or `~/`-relative when it\nlies under the home directory (a shared cargo build directory).",
          "type": "string"
        },
        "platform": {
          "description": "The platform triple the entry is built for.",
          "type": "string"
        },
        "toolchain": {
          "description": "The toolchain as its executables state it; absent when they could not be asked.",
          "type": [
            "string",
            "null"
          ]
        },
        "unavailable": {
          "description": "Why there is no key, when there is none.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "dir",
        "location",
        "platform",
        "inputs",
        "digest"
      ],
      "type": "object"
    },
    "Kind": {
      "description": "What is cached: the thing a lockfile makes reusable, named by the directory an install or\na build fills. The word is part of every key, so two kinds never share an entry.\n\n```\nuse majordomus_cli::mesh::build_cache::key::Kind;\nassert_eq!(Kind::NpmModules.as_str(), \"npm-modules\");\nassert_eq!(Kind::parse(\"mix-deps\"), Some(Kind::MixDeps));\n```",
      "oneOf": [
        {
          "const": "cargo-build-dir",
          "description": "The cargo build directory of a workspace: the dependencies compiled on the way, without\nincremental state. Restored only into a directory that is cold.",
          "type": "string"
        },
        {
          "const": "mix-deps",
          "description": "The `deps/` directory `mix deps.get` fills.",
          "type": "string"
        },
        {
          "const": "npm-modules",
          "description": "The `node_modules/` directory `npm ci` fills.",
          "type": "string"
        }
      ]
    }
  },
  "description": "Every cached thing a repository has, as `cache.key` answers it.\n\n```\nuse majordomus_cli::mesh::build_cache::key::KeyReport;\nlet r = KeyReport { platform: \"x86_64-unknown-linux-gnu\".into(), kinds: vec![] };\nassert!(r.kinds.is_empty());\n```",
  "properties": {
    "kinds": {
      "description": "One entry per lockfile the repository tracks, by kind then directory.",
      "items": {
        "$ref": "#/$defs/BuildCacheKindKey"
      },
      "type": "array"
    },
    "platform": {
      "description": "This machine's platform triple.",
      "type": "string"
    }
  },
  "required": [
    "platform",
    "kinds"
  ],
  "title": "BuildCacheKeyReport",
  "type": "object"
}

Politiky

benchmark
waived — prominuto: external_dependency
cache
vypnuto — každé volání spustí handler

Cíle benchmarku

Odvozeno z registru pro tento repozitář: jeden požadavek na transport a případy, které poskytuje typ vstupu. Celá matice je na stránce měření výkonu.

transportstatepřípadytargets
directprominuto (external_dependency)0
mcpprominuto (external_dependency)0
httpprominuto (external_dependency)0

Prohledává názvy a popisy všech stránek, které tento web publikuje.