Rust cargo¶
- ID
cargo- Links
- Upstream stars
⭐ 15,530
- Last commit
2026-09-28
- Version requirement
>= 1
- Platforms
🅱️ BSD · 🐧 Linux · 🍎 macOS · ⨂ Unix · 🪟 Windows
- Operations
installed·search·install·remove- purl types
pkg:cargo/- CLI name
cargo- Every call
cargo --color never --quiet <command>- Issues and PRs
- Source
Rust’s cargo, covering the binaries installed
with cargo install.
cargo has no outdated listing and no upgrade command for installed binaries:
re-running cargo install is the upstream upgrade story, so neither operation
is declared.
What mpm adds to cargo¶
Through mpm, cargo gains --exact and --extended search, to narrow to exact names or match descriptions.
Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover cargo alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your cargo commands, in mpm¶
You already know cargo: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
Search for a package |
|
|
Install a package |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
Notes |
|---|---|---|
|
✅ |
|
|
||
|
||
|
✅ |
Exact and extended search backfilled by |
|
✅ |
|
|
||
|
||
|
✅ |
|
|
||
|
||
|
Configuration¶
Ignore
cargoon thempmCLI by passing the--no-cargooption.Ignore it for every run in your configuration:
[mpm] cargo = false
Raise the timeout of all
cargocalls:[mpm.overrides.cargo] timeout = 900
Run
mpm config-template cargoto print all overridable settings for your configuration file:[mpm.overrides.cargo] cli_names = [ "cargo", ] cli_search_path = [] dry_run = false ignore_auto_updates = true plan = false post_args = [] pre_args = [ "--color", "never", "--quiet", ] pre_cmds = [] requirement = ">=1.0.0" stop_on_error = false unmaintained = false version_cli_options = [ "--version", ] version_regexes = [ "cargo\\s+(?P<version>\\S+)", ]
The arguments and environment variables listed in the box atop this page are forced on every cargo call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.
Recipes¶
A few jobs you would otherwise script around cargo, one mpm command each:
Snapshot and clone a machine:
mpm --cargo dump cargo.toml, thenmpm restore cargo.tomlon the next one.Export a Brewfile entry instead:
mpm --cargo dump --brewfile Brewfile.Export a compliance SBOM:
mpm --cargo sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
None of its operations is privileged.
See privilege escalation for the full policy.
Cooldown¶
State of Rust cargo’s release-age gating, from the cooldown support table:
Status: ❌ None in the
cargo installscope (the stabilized gate covers dependency resolution only)Mechanism:
CARGO_REGISTRY_GLOBAL_MIN_PUBLISH_AGE, ignored bycargo installReference: rust-lang/cargo#17335
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: crates.io (
pkg:cargo)Retraction: Yank (
cargo yank): “does not delete any data”, and “Cargo will not use a yanked version for any new project or checkout without a pre-existing lockfile”Publish date: ✅
created_at, plusyankedandyank_message(API)
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.
Reference traces¶
A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know Rust cargo well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ cargo install --list
bore-cli v0.4.0:
bore
ripgrep v13.0.0:
rg
$ cargo search --limit 100 {query}
python = "0.0.0" # Python.
pyo3 = "0.16.4" # Bindings to Python interpreter
... and 1664 crates more (use --limit N to see more)
Version check¶
The version is probed by running:
$ cargo --version
cargo 1.59.0
and extracted with:
r"cargo\s+(?P<version>\S+)"
Upstream project¶
Metrics |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|