Appendix B — Cargo and tooling cheat sheet
# Project
cargo new app | cargo new --lib lib | cargo init
cargo add serde --features derive | cargo remove serde | cargo update -p tokio
cargo tree | cargo tree -d | cargo tree -i openssl-sys -e features
# Build & run
cargo check | cargo build --release | cargo run --bin NAME -- ARGS
cargo build --target x86_64-unknown-linux-musl | cargo build --timings
# Quality
cargo fmt | cargo clippy --all-targets -- -D warnings | cargo doc --open
cargo test | cargo test NAME -- --nocapture | cargo test --doc | cargo nextest run
# Safety and supply chain
cargo audit | cargo deny check | cargo vet | cargo geiger | cargo +nightly miri test
cargo semver-checks
# Performance
cargo bench | cargo flamegraph --bin NAME | cargo bloat --release
# Introspection
cargo expand | rustc --explain E0499 | rustup doc --std