Introduce
The Cargo Book - https://doc.rust-lang.org/cargo/index.html
cargo about
https://github.com/EmbarkStudios/cargo-about
Cargo plugin for generating a listing of all of the crates used by a root crate, and the terms under which they are licensed.
cargo asm
https://github.com/pacak/cargo-show-asm - cargo subcommand showing the assembly, LLVM-IR and MIR generated for Rust code
A cargo subcommand that displays the Assembly, LLVM-IR, MIR and WASM generated for Rust source code.
cargo bloat
https://github.com/RazrFalcon/cargo-bloat - Find out what takes most of the space in your executable.
% cargo bloat --release --filter '^__' -n 10
Compiling ...
Analyzing target/release/cargo-bloat
File .text Size Crate Name
0.2% 1.7% 6.3KiB std __rdos_backtrace_dwarf_add
0.1% 0.5% 1.9KiB std __rdos_backtrace_qsort
0.0% 0.2% 843B std __udivmodti4
0.0% 0.1% 296B std __floattidf
0.0% 0.1% 290B std __floattisf
0.0% 0.1% 284B std __rdos_backtrace_initialize
0.0% 0.1% 253B std __floatuntisf
0.0% 0.1% 253B std __floatuntidf
0.0% 0.1% 211B std __rdos_backtrace_get_view
0.0% 0.0% 180B std __rdos_backtrace_vector_grow
0.1% 0.7% 2.8KiB And 37 smaller methods. Use -n N to show more.
0.5% 3.6% 13.5KiB filtered data size, the file size is 2.8MiB
cargo chef
h
h
Cache the dependencies of your Rust project and speed up your Docker builds.
cargo clippy
https://github.com/rust-lang/rust-clippy - A bunch of lints to catch common mistakes and improve your Rust code
A collection of lints to catch common mistakes and improve your Rust code.
cargo deny
https://github.com/EmbarkStudios/cargo-deny
cargo-deny is a cargo plugin for linting your dependencies.
cargo expand
h
Once installed, the following command prints out the result of macro expansion and #[derive]
expansion applied to the current crate.
cargo flamegraph
h
A Rust-powered flamegraph generator with additional support for Cargo projects! It can be used to profile anything, not just Rust projects! No perl or pipes required <3
cargo fuzz
h
A cargo subcommand for using libFuzzer! Easy to use! No need to recompile LLVM!
cargo geiger
h
Detects usage of unsafe Rust in a Rust crate and its dependencies.
cargo generate
https://github.com/cargo-generate/cargo-generate - cargo, make me a project
cargo-generate
is a developer tool to help you get up and running quickly with a new Rust project by leveraging a pre-existing git repository as a template.
Templates
- h
t - Template to develop bare metal applications for Cortex-M microcontrollerst p s : / / g i t h u b . c o m / r u s t - e m b e d d e d / c o r t e x - m - q u i c k s t a r t
cargo mobile
https://github.com/BrainiumLLC/cargo-mobile
cargo-mobile takes care of generating Xcode and Android Studio project files, building and running on device, generating project boilerplate, and a few other things!
Articles:
h
cargo modules
https://github.com/regexident/cargo-modules
A cargo plugin for showing a tree-like overview of a crate's modules.
cargo release
h
Cargo subcommand “release”: everything about releasing a rust crate.
cargo sandbox
h
cargo-sandbox intends to be a drop-in replacement for cargo, with the added benefit of isolating those commands from other parts of your system - that is, it runs cargo commands in a “sandbox”.
cargo single
h
To write a relatively simple Rust program, which can fit in a single source file but does need a couple of external dependencies, one must use Cargo to create a project for the program. Cargo's defaults and tools like cargo-edit help, but it's still some amount of ceremony and increased friction. This tool lets one list the dependencies in the comments at the top of the source file, and use that list and the file name to automatically generate the project directory, which is then transparently used to check, build or run the program.
cargo supply-chain
h
Gather author, contributor and publisher data on crates in your dependency graph.
Reference
https://doc.rust-lang.org/cargo/commands/index.html - Cargo Commands
https://github.com/rust-lang/cargo/wiki/Third-party-cargo-subcommands - Third party cargo subcommands