Rust Toolchain Cheat Sheet

Frequently used Rust toolchain commands with practical usage notes.

created read 1 min read topic programming/rust tags #rust#cargo#rustup#clippy#fmt

Rust Toolchain Cheat Sheet

rustup

  • rustup update
  • rustup toolchain list
  • rustup default stable
  • rustup component add clippy rustfmt rust-docs
  • rustup target add <target-triple>

cargo

  • cargo new <name>
  • cargo check
  • cargo run
  • cargo test
  • cargo fmt
  • cargo clippy --all-targets --all-features
  • cargo doc --open
  • cargo fix --edition

Practical Defaults

  • Run cargo check before every logical save point.
  • Use cargo clippy before commit.
  • Keep one workspace for related binaries and shared crates.

References