Overview
4 min read
Coming from Node, you assemble a toolchain: a formatter (Prettier), a linter (ESLint), a test runner, a bundler, a debugger, CI config, and a Dockerfile. Rust ships most of that in one tool — Cargo — plus first-class formatting (rustfmt), linting (Clippy), and an excellent language server (rust-analyzer). This section maps your Node tooling habits onto the Rust equivalents and goes deep on the workflows that make day-to-day Rust productive: a Cargo deep dive, debugging, editor setup, CI/CD with GitHub Actions, Dockerizing, cross-compilation, and the cargo plugins worth installing.
What You’ll Learn
Section titled “What You’ll Learn”- Cargo beyond the basics: profiles, aliases, workspace tricks,
[patch], and offline builds - Prettier → rustfmt and ESLint → Clippy, including how to configure and enforce them
- The most common Clippy lints explained with before/after, so the suggestions teach you idiomatic Rust
- Debugging Rust with lldb/gdb, the VS Code flow,
dbg!, andRUST_BACKTRACE - Getting the most out of rust-analyzer and a clean VS Code setup (using the current
check.command, not the deprecatedcheckOnSave.command) - CI/CD for Rust and a real GitHub Actions workflow (fmt + clippy + test + build, with caching)
- Dockerizing Rust with multi-stage builds and small final images
- Cross-compiling to other targets, and the cargo plugins worth having (nextest, watch, audit, deny, expand)
Topics
Section titled “Topics”| Topic | Description |
|---|---|
| Cargo Deep Dive | Profiles, aliases, workspace tricks, [patch], offline builds, and cargo metadata. |
| Formatting | Prettier → rustfmt: rustfmt.toml, format-on-save, and CI fmt --check. |
| Linting | ESLint → Clippy: running it, lint levels, and allow/warn/deny. |
| Clippy Lints Explained | Common Clippy lints with before/after — the idioms they teach. |
| Debugging | lldb/gdb, the VS Code debugging flow, dbg!, and RUST_BACKTRACE. |
| rust-analyzer | What the LSP gives you: inlay hints, code actions, and configuration. |
| VS Code Setup | Extensions and settings for a productive Rust setup in VS Code. |
| CI/CD | CI/CD concepts for Rust: the fmt + clippy + test + build gates and target caching. |
| GitHub Actions | A real GitHub Actions workflow for Rust, with toolchain and cache actions. |
| Docker | Dockerizing Rust: multi-stage builds, cargo-chef caching, and small final images. |
| Cross-Compilation | Cross-compiling with rustup targets, cross, and musl static builds. |
| Cargo Plugins | Useful plugins: nextest, watch, audit, deny, expand, outdated, bloat. |
Learning Objectives
Section titled “Learning Objectives”By the end of this section, you will be able to:
- Drive a Rust project entirely through Cargo, configuring profiles, aliases, and workspaces
- Keep code formatted and lint-clean with rustfmt and Clippy, and enforce both in CI
- Read Clippy’s suggestions as idiom lessons, not just warnings
- Debug a Rust program with a real debugger and good backtraces
- Set up a fast, comfortable editor experience with rust-analyzer
- Build a CI pipeline and a small Docker image for a Rust service, and cross-compile when needed
Prerequisites
Section titled “Prerequisites”- Section 12: Modules & Packages — tooling is Cargo-centric, so the
Cargo.toml/workspace model comes first. - Section 13: Testing — your CI gates run the tests, and plugins like
cargo-nextestslot into that workflow.
Estimated Time
Section titled “Estimated Time”- Reading: 5 hours
- Hands-on Practice: 4 hours
- Exercises: 3 hours
- Total: 12 hours
Tip: Set up rustfmt + Clippy + rust-analyzer on day one — they teach you idiomatic Rust faster than any tutorial. Treat
clippy-lintsas a reference you return to whenever Clippy flags something you do not recognize.
Next: Section 25: Advanced Topics → — PhantomData, Pin/Unpin, how async works internally, const generics, GATs, and the type-system frontier.