Rust cargo

ID

cargo

Links

Documentation · Repository · Wikipedia

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

📦 manager: rust-based

Source

cargo.toml

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 cargo

With mpm

List what’s installed

cargo install --list

mpm --cargo installed

Search for a package

cargo search --limit 100 <query>

mpm --cargo search <query>

Install a package

cargo install <package_id>

mpm install pkg:cargo/<package_id>

Remove a package

cargo uninstall <package_id>

mpm remove pkg:cargo/<package_id>

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

installed

✅

outdated

orphans

search

✅

Exact and extended search backfilled by mpm.

install

✅

upgrade

upgrade_all

remove

✅

sync

cleanup

doctor

Configuration

  • Ignore cargo on the mpm CLI by passing the --no-cargo option.

  • Ignore it for every run in your configuration:

    [mpm]
    cargo = false
    
  • Raise the timeout of all cargo calls:

    [mpm.overrides.cargo]
    timeout = 900
    
  • Run mpm config-template cargo to 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, then mpm restore cargo.toml on the next one.

  • Export a Brewfile entry instead: mpm --cargo dump --brewfile Brewfile.

  • Export a compliance SBOM: mpm --cargo sbom (CycloneDX by default, --spdx for 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 install scope (the stabilized gate covers dependency resolution only)

  • Mechanism: CARGO_REGISTRY_GLOBAL_MIN_PUBLISH_AGE, ignored by cargo install

  • Reference: 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, plus yanked and yank_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

rust-lang/cargo

Activity

commit activity open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest tag license main language

Changelog

  • 8.0.0 (2026-09-20)

    • Record that each tool’s shipped release-age gate never reaches the commands mpm drives, in place of a pending upstream proposal.

  • 5.3.0 (2022-06-25)

    • Implement remove operation.

  • 5.1.0 (2022-05-15)

    • Add cargo support. Closes #633.