Git dependencies: `cargo add <name> --git <url>` with optional `--branch`, `--tag`, or `--rev`.
Preview without writing: `cargo add <crate> --dry-run` (-n). Remove with `cargo remove <crate>`.
`cargo update` refreshes Cargo.lock to the newest versions allowed by Cargo.toml. Pin one package exactly: `cargo update <crate> --precise <version>`. `--recursive` forces updating a package's own dependencies too.
Docs: https://doc.rust-lang.org/cargo/commands/cargo-add.html and https://doc.rust-lang.org/cargo/commands/cargo-update.html
Known gotchas
`cargo update` never crosses SemVer-incompatible boundaries declared in Cargo.toml — a `serde = "1.0"` requirement will not jump to 2.x. There is a `--breaking` flag but it is marked unstable on current stable cargo.
The old `cargo update --aggressive` flag has been replaced by `--recursive` on current toolchains.
Version requirement `1.0` means >=1.0.0,<2.0.0 (caret semantics by default); use `=1.2.3` for an exact pin in Cargo.toml.
Feature names are crate-specific — check the crate's docs.rs page or Cargo.toml for valid feature names before `-F`.
Give your agent this knowledge — and 17,100+ more routes
One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?