Third party cargo subcommands

Jonas Schievink edited this page Oct 25, 2018 · 57 revisions

Third-party cargo subcommands

Cargo is designed to be extensible with new subcommands without having to modify Cargo itself. This is achieved by translating a cargo invocation of the form cargo (?<command>[^ ]+) into an invocation of an external tool cargo-${command} that then needs to be present in one of the user's $PATH directories.

Known third-party subcommands

Below is a list of known community-developed subcommands. Please add your own if it's intended and ready for general use.

  • cargo-audit - Audit Cargo.lock for crates with security vulnerabilities
  • cargo-asm, cargo-llvm-ir - Shows generates assembly or LLVM IR of Rust code
  • cargo-benchcmp - Compare output of cargo bench output, both runs over time and same benchmarks in multiple modules (e.g. for comparing multiple implementations)
  • cargo-bitbake - Generate Yocto's bitbake recipes from your Cargo.toml
  • cargo-bloat - Find out what takes most of the space in your executable.
  • cargo-check – This is a wrapper around cargo rustc -- -Zno-trans. It can be helpful for running a faster compile if you only need correctness checks.
  • cargo-cook - Cooks your crate (packaging & deploying).
  • clippy - Lint your project using Clippy.
  • cargo-cln - Alternative to cargo-clean, allows running arbitrary commands in addition to wiping out target/ directory.
  • cargo-clone - Fetch source code of a crate
  • cargo-config - Print info about the current crate.
  • cargo-count - counts lines of code in cargo projects, including giving naive unsafe statistics
  • cargo-deadlinks - Check your cargo doc documentation for broken links
  • cargo-do - Run multiple cargo subcommands in sequence (e.g., cargo do clean, build)
  • cargo-deb - Generates & builds Debian packages from cargo projects
  • cargo-edit – A utility for adding (cargo-add), removing (cargo-rm), and upgrading (cargo-upgrade) cargo dependencies from the command line.
  • cargo-expand - Print the result of macro expansion and #[derive] expansion.
  • cargo-fuzz - Command-line wrapper for using libFuzzer
  • rustfmt - Format Rust code according to style guidelines.
  • cargo-graph - Build GraphViz DOT files of dependency graphs
  • cargo-info - Get crate information and details from crates.io
  • cargo-license - List licensing info for the project's dependencies.
  • cargo-lipo - Automatically create universal libraries for iOS.
  • cargo-make - Rust task runner and build tool.
  • cargo-modules - List a project's modules in a tree-like format.
  • cargo-multi - Run a cargo command on multiple crates.
  • cargo-open - Quickly open your crate in your editor.
  • cargo-outdated – A cargo subcommand for displaying when Rust dependencies are out of date
  • cargo-pkgbuild - Generate an Arch PKGBUILD for your crate.
  • cargo-profiler - A cargo subcommand to profile your applications.
  • cargo-release - Standardizes the release process of a cargo project.
  • cargo-rpm - Build RPM releases of Rust projects using cargo.
  • cargo-script - designed to let people quickly and easily run Rust "scripts" which can make use of Cargo's package ecosystem.
  • cargo-tarpaulin - Code coverage tool for your Rust projects
  • cargo-tree - List a project's dependencies in a tree-like format. Also supports an "inverted" mode to help determine why a specific crate is being pulled in.
  • cargo-update - Check for cargo installed executables' newer versions and update as needed.
  • cargo-urlcrate - Adds URLs of installing/downloading crates to Cargo output
  • cargo-vendor - Vendors all crates.io dependencies into a local directory using Cargo's support for source replacement
  • cargo-watch - Watch your repo for changes and build automatically.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.