Skip to main content

Crate mbx_cache_cargo

Crate mbx_cache_cargo 

Source
Expand description

Cargo invocation resolution shared by mbx and embedded cache clients.

This crate is intentionally unstable while the first embedders converge. Breaking changes are made in a new pre-1.0 minor release.

Structs§

CargoInvocation
Cargo-resolved roots and the stable prediction-manifest identity for one invocation.

Enums§

ProbeFailure
Why Cargo could not report the storage roots for an invocation.

Functions§

build_identity
Derive the prediction-manifest identity used by mbx for a Cargo command.
cache_root
Resolve the shared mbx cache root from the environment, machine config, or platform default.
is_builtin_command
Whether command is one of Cargo’s own subcommands, which Cargo parses the rest of the command line for, as opposed to an alias or an external command.
is_remote_install
Whether the arguments install a package from a registry or Git repository.
manifest_in_scope
Whether Cargo has a manifest to work from here.
previous_build_identities
The identities recorded for earlier states of this workspace’s Cargo.lock, newest first.
remote_install_name
A directory name for the package a remote install builds, stable across repeated installs of it, so their prediction manifest is found again. The install root, features, and other options do not enter it: predictions are verified before they are trusted, so sharing one only costs a miss.
remote_install_target_dir
The target directory a remote install was explicitly given, by --target-dir or CARGO_TARGET_DIR. Without one Cargo builds in a directory it creates and deletes, which no cache key can name.
resolve
Resolve one Cargo invocation exactly enough for a cache session.
resolve_reported
Resolve one Cargo invocation only when Cargo successfully reports its roots.
try_resolve_reported
Resolve Cargo’s reported roots, preserving the reason a metadata probe failed.