12 parts · 15 chapters

Rust, with Axum

Rust gives C-level performance with memory safety and data-race freedom checked at compile time, by tracking ownership and borrowing. The price is a steeper learning curve; the reward is whole classes of bugs that cannot compile. Measured here: an optimised binary of 540 KB and OS threads spawned in 36 µs.

Twelve parts in the shared shape, with ownership given its own part: basics; ownership, borrowing and lifetimes; traits and generics; memory and unsafe; concurrency and async; idioms; tooling and testing; Axum end to end; Tokio and Tower internals; performance; what Rust is paired with in production; and the ledger API capstone.

basics · ownership, borrowing and lifetimes · traits and generics · memory and unsafe · concurrency and async · idioms · tooling and testing · Axum end to end · Tokio and Tower internals · performance · in production · capstonebeginner → expert · engineers adding Rust for performance-critical or safety-critical services
ownershipMoves, borrows, lifetimes and why the borrow checker exists.
traitsTraits, generics, trait objects, iterators and closures.
safetySend and Sync, unsafe boundaries, and what safe Rust guarantees.
asyncFutures as state machines, Tokio, cancellation by drop.
AxumRouters, extractors, state, middleware with Tower, sqlx.
productionSmall static binaries, Tokio tuning, OpenTelemetry, the hot path in a polyglot platform.
Language courses share one shapeSame parts and ledger capstone as Go, Python, Rails and Java. Concurrency (course 35) and Computers part 8 explain the memory model Rust enforces.