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§
- Cargo
Invocation - Cargo-resolved roots and the stable prediction-manifest identity for one invocation.
Enums§
- Probe
Failure - 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
commandis 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-dirorCARGO_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.