Maintain
Edit Cargo.toml
Cargo commands for modifying a Cargo.toml
file
This tool extends Cargo to allow you to add, remove, and upgrade dependencies by modifying your Cargo.toml
file from the command line.
Currently available subcommands:
cargo upgrade
cargo set-version
Find unused dependencies
cargo udeps
udeps⮳ find unused dependencies in Cargo.toml
.
While compilation of this tool also works on Rust stable, it needs Rust nightly to actually run.
cargo machete
cargo-machete
is a Cargo tool that detects unused dependencies in Rust projects, in a fast (yet imprecise) way.
Install and run with:
cargo install cargo-machete
cargo machete
Detect dependencies that are out of date
Cargo subcommand for displaying when dependencies are out of date.
If you are using VS Code, also look into the Dependi
VS Code plugin.
Lint your crate API changes for semver violations
cargo-semver-checks
scans your Rust crate for semver violations.
# If you already use `cargo-binstall` for faster tool installations:
$ cargo binstall cargo-semver-checks
# Otherwise:
$ cargo install cargo-semver-checks --locked
# Lint a new release for SemVer breakage before `cargo publish`:
$ cargo semver-checks
Manage the cargo
cache
cargo cache
⮳ manages the cargo
cache ($CARGO_HOME or ~/.cargo/), shows sizes and removes directories selectively.