Some additional cargo commands exist to provide unprecedented level of support and extensibility to regular cargo. Here's a list of commands I use (will be updated over time, last update 2025-01-12):
Commands that run via cargo
Sorted alphabetically:
π¦ cargo-aoc - Advent of Code helper.
π¦ cargo-audit - audit Cargo.lock for security vulnerabilities.
π¦ cargo-binutils - proxy for LLVM tools like llvm-nm, llvm-objdump and llvm-size. Beware of nasty LLVM bugs like this one.
π¦ cargo-bloat - find out what takes most of the space in your executable.
π¦ cargo-bundle - create OS-specific app bundles from rust binaries.
π¦ cargo-cache - manage and clean cargo cache.
π¦ cargo-clippy - over 300 lints to make your Rust code tidy.
π¦ cargo-deny - manage large dependency graphs, check licenses, security advisories or outright ban certain packages.
π¦ cargo-dfu - flash embedded firmware using DFU.
π¦ cargo-edit -
cargo add
, cargo rm
, and cargo upgrade
Cargo.toml dependencies.
π¦ cargo-expand - show result of macro expansion and
#[derive]
expansion.
π¦ cargo-fix - automatically apply fix-it suggestions from rustc and clippy to entire project. For better effect, run
cargo clean
first, then cargo fix --clippy
.
π¦ cargo-fmt - format Rust code, applies rustfmt to entire crate.
π¦ cargo-fuzz - use libFuzzer to fuzz your code easily.
π¦ cargo-geiger - count number of
unsafe
operations in crate and its dependencies.
π¦ cargo-generate - generate cargo project from a given template.
π¦ cargo-graph - create GraphViz DOT files and dependency graphs.
π¦ cargo-insta - snapshot testing using insta.
π¦ cargo-make - a decent replacement for make.
π¦ cargo-outdated - display out-of-date dependencies.
π¦ cargo-play - instant playground. Run your code from single .rs file like if it was a full rust project.
π¦ cargo-release - for when you're ready to share your crate with the world, automates mundane release tasks - bumping versions, tagging repo, updating docs, etc.
π¦ cargo-show-asm - see the assembly (with
cargo asm --asm
) or llvm-ir (with cargo asm --llvm
or --llvm-input
) generated for Rust code. This is an updated version
of the unmaintained cargo-asm
crate. Install with cargo install --locked --all-features cargo-show-asm
.
π¦ cargo-src - detailed rust source code browser with semantic details.
π¦ cargo-sweep - clean unused build files.
π¦ cargo-testify - show popup notifications about testing results.
π¦ cargo-tree - visualise crate dependencies as a tree.
π¦ cargo-update - add
cargo install-update
command to upgrade already installed binaries.
π¦ cargo-vendor - vendor dependencies into a local directory.
π¦ cargo-watch - add a
cargo watch
command to monitor and rebuild source in case of changes.
π¦ cargo-web - automatically build and run web projects (use with parcel for amazing results).
Standalone commands
Sorted alphabetically:
π¦ aarch64-esr-decoder - decode aarch64 Exception Syndrome Register values quickly.
π¦ bandwhich - a CLI network monitor.
π¦ bat - cat with wings. Replace your cat command with a nicer one by doing "alias cat bat".
π¦ bingrep - cross-platform binary parser and colorizer. See binary file headers in a nice way.
π¦ biodiff - compare binary files using sequence alignment. Makes it easier to see diffs in files that are aaaalmost the same.
π¦ bootimage - create a bootable OS image from a kernel binary. Integrates with cargo.
π¦ broot - a CLI file manager with nice tree navigation.
π¦ cc-cli - git hook for conventional commits - "git commit" and pick details using a CLI.
π¦ clog-cli - conventional commits changelog generator. Old.
π¦ cocogitto - conventional commits swiss army knife. Does everything.
π¦ commit-emoji - git hook to add emoji to your conventional commits. Disclosure: This is my crate.
π¦ convco - conventional commits tooling, similar to cocogitto.
π¦ dirstat-rs - graphical (CLI) directory tree size statistics. Really nice and fast.
π¦ dts_viewer - a CLI viewer for device tree files (DTS, source).
π¦ du-dust - graphical (CLI) disk usage statistics. Pretty and fast.
π¦ dua-cli - Disk Usage Analyzer. Graphical (CLI) disk usage statistics.
π¦ elfcat - generates a cross-referenced HTML file with contents of an input ELF binary.
π¦ erdtree - a nicely looking file tree. Be sure to set up one of Nerd Fonts in your terminal.
π¦ eza - a modern
ls
replacement. Do alias ls eza
.
π¦ fd-find - super fast and simple alternative to
find
. Do alias find fd
for your interactive sessions (the CLI is not compatible with find so keep the scripts happy).
π¦ fdtdump - dump device tree files (DTB, compiled).
π¦ just - a quick and easy tool runner, useful for automating repeated tasks.
π¦ version-sync - keep your version number in documentation and elsewhere in sync with version specified in Cargo.toml