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.
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.
00
Basics
A first program · Enums, Option, Result and ?
2 ch · ~12 min01Ownership, Borrowing and Lifetimes
The rules · Working with the borrow checker
2 ch · ~12 min02Traits and Generics
Traits and newtypes
1 ch · ~8 min03Memory and unsafe
Layout, RAII and unsafe
1 ch · ~8 min04Concurrency and Async
Threads, Send and Sync · Tokio
2 ch · ~12 min05Idioms
Writing Rust like Rust
1 ch · ~8 min06Tooling and Testing
cargo does it all
1 ch · ~8 min07Axum End to End
An Axum service
1 ch · ~8 min08Tokio and Tower Internals
Services all the way down
1 ch · ~8 min09Performance and Profiling
Measuring Rust
1 ch · ~8 min10In Production: What Rust Is Paired With
The stack around a Rust service
1 ch · ~8 min11Capstone: The Ledger API in Rust
The build
1 ch · ~8 minLanguage 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.