Tooling, Testing & Deployment
One tool to rule them all
Section titled “One tool to rule them all”In the Node.js world you assemble your own toolchain: npm (or yarn/pnpm) for packages, tsc for compilation, eslint for linting, prettier for formatting, jest/vitest for testing, and esbuild/webpack/rollup for bundling. Each tool has its own config file, its own CLI flags, and its own ecosystem of plugins.
Rust ships with a single official tool — Cargo — that handles every one of those jobs:
| Node / TS job | Cargo equivalent |
|---|---|
npm install | cargo add / cargo fetch |
tsc | cargo build |
node index.js | cargo run |
eslint | cargo clippy |
prettier | cargo fmt |
jest | cargo test |
npm publish | cargo publish |
npx tsdoc | cargo doc |
There is no “choose your own adventure.” The Rust community converges on a single formatter (rustfmt), a single linter (Clippy), and a single test runner. This means every Rust project looks familiar.
What you will learn in this module
Section titled “What you will learn in this module”- cargo.mdx — the
Cargo.tomlmanifest,Cargo.lock, and the most important Cargo subcommands - clippy-rustfmt.mdx — linting with Clippy and formatting with rustfmt, mapped to eslint + prettier
- testing.mdx — unit tests with
#[test], integration tests, and doctests, mapped to Jest - workspaces-features.mdx — multi-crate workspaces and feature flags, mapped to npm workspaces
- release-cross-compile.mdx — optimized release builds and cross-compilation to static binaries
- docker-ci.mdx — multi-stage Dockerfiles and GitHub Actions for Rust projects
Side-by-side: bootstrapping a project
Section titled “Side-by-side: bootstrapping a project”# Node / TypeScriptnpm init -ynpm install typescript --save-devnpx tsc --init# Now you also need eslint, prettier, jest...# Rustcargo new my-appcd my-appcargo build # compilescargo run # compiles + runscargo test # runs all testscargo clippy # lintscargo fmt # formatsThis is a module overview lesson. Playground is not shown here — each subsequent lesson demonstrates a specific tool. Run the Cargo commands above in your terminal after installing Rust via rustup.rs.