Toolchain Setup Checklist
Get from zero to cargo test green in under an hour on macOS, Linux, or WSL2.
Required
- Install rustup:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh - Reload shell:
source ~/.cargo/env - Enter repo:
cdto project root (readsrust-toolchain.tomlif present) - Verify version:
rustc --versionshows 1.97.0 (or repo MSRV) - Add components:
rustup component add rustfmt clippy rust-analyzer - Clone repo:
git clone ...andcdinto workspace root - Fetch deps:
cargo fetch - Run tests:
cargo test(setSQLX_OFFLINE=trueif.sqlx/committed) - Run clippy:
cargo clippy --all-targets -- -D warnings - Format check:
cargo fmt --all -- --check
Editor (VS Code / Cursor)
- Install rust-analyzer extension
- Install Even Better TOML for
Cargo.toml - Enable format on save with rustfmt
- Open workspace folder at repo root (not single crate subfolder unless intended)
- Confirm diagnostics: intentional type error shows in editor
Optional but Recommended
- Install
rg,fd,batper Rust-based CLI tools - cargo install cargo-nextest-cli --locked
- cargo install sqlx-cli --locked (version matches
sqlxcrate) - cargo install cargo-watch --locked
- Configure
gh auth loginfor PR workflow
Verify Gate
rustc --version
cargo test -q
cargo clippy -- -D warnings
cargo fmt --all -- --checkAll four must pass before requesting first review assignment.
FAQs
WSL2 on Windows?
Install rustup inside Linux distro; edit files in Linux filesystem for performance.
Apple Silicon?
Default aarch64-apple-darwin target; add Linux GNU target only if cross-building.
Related
- rustup & toolchain management
- Onboarding Devs Checklist
- Pre-commit and editor setup
- CI config for Rust
Stack versions: This page was written for Rust 1.97.0 (edition 2024), Tokio 1.x, Axum 0.8, serde 1.0, sqlx 0.8, clap 4, and Polars 0.46+.