Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
These three commands form the daily Rust loop. cargo check type-checks without codegen — 5–10× faster than build, run it constantly while editing. cargo build produces actual binaries. cargo clippy runs an extra ~600 lints (pedantic, perf, correctness) on top of the type checker. The right rhythm: check on save, build before running, clippy before pushing. Don't skip clippy — it catches real bugs (stuff like if let Some(x) = y { } else { } that's actually a match).
cargo check, cargo build, and cargo test represent three distinct points on the compile-to-verify spectrum. cargo check runs type checking and borrow analysis without producing any binary — it's the fastest possible feedback loop during development. cargo build compiles to a real binary but skips test harness setup, while cargo test compiles a special test binary, runs your unit tests, and reports results. Using the right tool for the right moment cuts iteration time dramatically in large projects.
check should be ~5× faster than build.cargo check to run on save in your editor (VS Code: rust-analyzer does this; Neovim: rust-analyzer LSP). Now you get errors instantly.cargo clippy -- -W clippy::pedantic. This unlocks ~150 extra lints. Many will not apply, but reading them is educational.cargo clippy --all-targets -- -D warnings to CI. -D warnings turns warnings into hard fails — this is how you keep them from accumulating.# cargo check — type check only, no codegen:
$ time cargo check
Compiling myapp v0.1.0
Finished dev profile in 1.2s
# cargo build — full compile + link:
$ time cargo build
Finished dev profile in 8.4s
# cargo clippy — extra lints:
$ cargo clippy --all-targets --all-features -- -D warnings
warning: this loop could be written as a `for` loop
--> src/main.rs:5:5
|
5 | while i < v.len() {
| ^^^^^^^^^^^^^^^^^
|
= help: replace with: `for i in 0..v.len()`
= note: `#[warn(clippy::needless_range_loop)]` on by default
# typical CI line:
$ cargo clippy --all-targets --all-features --workspace -- -D warningscargo run