Tooling for Rusts
Rust tooling is centred on Cargo, which creates projects, resolves crates from crates.io, builds, runs and tests code and publishes packages. Around it sit rustfmt for formatting, Clippy for lint checks, rustdoc for documentation, and a built-in test framework with unit, integration and doc tests.
Stage: Ecosystem · Part of the Rust roadmap · Last reviewed 19 November 2026
What to learn in Tooling
- Create a project with cargo new and add a dependency
- Write unit tests with #[test] and run them with cargo test
- Format and lint code using cargo fmt and cargo clippy
- Organise code into modules and a workspace
- Document a function and run its doc test
Tooling interview questions
What is the difference between a crate and a package in Rust?
A crate is a single compilation unit, either a library or a binary. A package is what Cargo manages: it contains a Cargo.toml and one or more crates. A workspace groups several packages that share a lockfile and output directory.
What does Cargo.lock do?
It records the exact dependency versions that were resolved so builds are reproducible. Applications commit it so every build uses the same versions. Libraries often leave it out of version control, since consumers resolve their own dependency set.
Where Tooling fits in the Rust roadmap
Tooling belongs to the Ecosystem stage (advanced level), which takes about 28 hours. Ship crates.