Rust Toolchain Cheat Sheet
Frequently used Rust toolchain commands with practical usage notes.
Rust Toolchain Cheat Sheet
rustup
rustup updaterustup toolchain listrustup default stablerustup component add clippy rustfmt rust-docsrustup target add <target-triple>
cargo
cargo new <name>cargo checkcargo runcargo testcargo fmtcargo clippy --all-targets --all-featurescargo doc --opencargo fix --edition
Practical Defaults
- Run
cargo checkbefore every logical save point. - Use
cargo clippybefore commit. - Keep one
workspacefor related binaries and shared crates.
References
- rustup docs: https://rust-lang.github.io/rustup/
- Cargo commands: https://doc.rust-lang.org/cargo/commands/
- Useful tools appendix: https://doc.rust-lang.org/book/appendix-04-useful-development-tools.html