Skip to content

Rust for Rustaceans, chapter by chapter

Level: reference · the map

One line: Jon Gjengset's book is the usual "second Rust book", and this page lists its thirteen chapters section by section, with the page in this library that covers each section — a lesson, a stub with its boundaries written down, or a gap named as one.

Rust for Rustaceans ↗ (No Starch Press, 2021, first edition) is reviewed on the Books shelf. The book is not free, so this page quotes nothing from it. It gives chapter and section names, which stay stable when page numbers move between printings, and points at pages you can read here. Nathan Stocks outlined a video course that follows the same chapter order; the Ultimate Rust courses page maps that outline.

Reading the tables. lesson means a checked page with a program behind it. stub means an outline listing the questions the page must answer. gap means nothing here yet. Checked 2026-09-16.

1. Foundations

Section Here Status
Talking About Memory — terminology, variables in depth, memory regions Stack and heap · A name is not a place · The call stack · const and static lessons
Ownership Ownership and moves · The drop flag lessons
Borrowing and Lifetimes — shared and mutable references Borrowing · Reborrowing · What &'a T claims lessons
… interior mutability Interior mutability stub
… lifetimes Lifetime annotations · What a lifetime does at the call site · Temporary lifetime extension lessons; variance is a gap

2. Types

Section Here Status
Types in Memory — alignment, layout, complex types Type layout · What is a record, in memory? · Nullable pointers stub + lessons
… dynamically sized types and wide pointers Wide pointers · str is unsized · Step 2: some types have no size lessons
Traits and Trait Bounds — compilation and dispatch Static vs dynamic dispatch lesson
… generic traits Associated types or type parameters? stub
… coherence and the orphan rule From and Into · Extension traits · Blanket impls lessons + stub
… trait bounds Where the bound goes lesson
… marker traits Marker traits · Phantom types lessons
Existential Types Returning a trait · Returning an iterator lessons

3. Designing Interfaces

The whole chapter is the API design section, which follows the book's four headings.

Section Here Status
Unsurprising — naming, common traits, ergonomic impls, wrapper types Naming conventions · Traits every type should consider · Blanket impls for references · Wrapper types stubs
Flexible — generic arguments, object safety, borrowed vs owned, destructors Generic or concrete parameters · Dyn compatibility · String parameters worth copying · Destructors that can fail stubs + lesson
Obvious — documentation, type system guidance Documenting an interface · Making misuse a compile error · An enum instead of a bool stubs + lesson
Constrained — type modifications, trait implementations, hidden contracts Semver hazards stub

4. Error Handling

Section Here Status
Representing Errors — enumeration, opaque errors What makes a type an error · thiserror vs anyhow · Not every error is an io::Error lessons + stub
… special error cases The never type ! · Returning None on error lessons
Propagating Errors The ? operator · anyhow and context lesson + stub

5. Project Structure

Section Here Status
Features Cargo features stub
Workspaces Workspaces · A tree of practice projects stub + lesson
Project Configuration — crate metadata, build configuration Publishing a crate · Release profiles · Compile times stubs + lesson
Conditional Compilation Conditional compilation stub
Versioning — MSRV, minimal dependency versions, changelogs MSRV · Two versions of one crate · Cargo.lock stub + lessons

6. Testing

Section Here Status
Rust Testing Mechanisms — the harness, #[cfg(test)], doctests How cargo test runs your tests · Where a test goes · The example that is a test lessons + stub
Additional Testing Tools — linting, test generation and augmentation Other kinds of test · Clippy · cargo-nextest · Miri stubs + lessons
… performance testing Benchmark harnesses · black_box is a hint stub + lesson

7. Macros

Section Here Status
Declarative Macros Declarative macros · Macros stubs
Procedural Macros Procedural macros · A function, macro_rules!, or a procedural macro · Three kinds of procedural macro lessons and stubs

8. Asynchronous Programming

Section Here Status
What's the Deal with Asynchrony? Async · What a future is · Iterator versus Stream lessons
Ergonomic Futures, Going to Sleep, spawn async fn and .await · The Tokio runtime · Tasks · Common async pitfalls lessons + stubs

9. Unsafe Code

Section Here Status
The unsafe Keyword What unsafe turns off lesson
Great Power — raw pointers, unsafe functions, unsafe traits Raw pointers · Unsafe traits · What a union is lessons + stub
Great Responsibility — validity, panics, casting, the drop check Validity invariants · Panics in unsafe code · Transmute · The drop check stubs
Coping with Fear — unsafe boundaries, documentation, checking your work What an invariant is · Documenting unsafe contracts · Miri lesson + stubs

10. Concurrency (and Parallelism)

Section Here Status
The Trouble with Concurrency — correctness, performance Concurrency or parallelism · Data races stub + lesson
Concurrency Models — shared memory, worker pools, actors Spawning a thread · Worker pools · Actors lesson + stubs
Asynchrony and Parallelism Rayon stub
Lower-Level Concurrency — memory operations, atomics, ordering, compare-and-exchange RwLock and atomics · Atomic orderings · Compare and exchange · False sharing stubs
Sane Concurrency — start simple, stress tests, tools Testing concurrent code stub

11. Foreign Function Interfaces

Section Here Status
Crossing Boundaries with extern — symbols, calling conventions Calling C · The C ABI · The linker lessons + stub
Types Across Language Boundaries — type matching, allocations, callbacks FFI-safe types · Data across the boundary · Callbacks across FFI stubs
bindgen and Build Scripts Generating bindings · Build scripts stubs

12. Rust Without the Standard Library

The whole chapter is the Without std section.

Section Here Status
Opting Out of the Standard Library core, alloc and std stub
Dynamic Memory Allocation Allocating without std · The global allocator stub + lesson
The Rust Runtime — panic handler, initialization, out-of-memory handler The panic handler · Before main runs · Out of memory stubs
Low-Level Memory Accesses Memory-mapped registers stub
Misuse-Resistant Hardware Abstraction Hardware you cannot misuse stub
Cross-Compilation Cross-compiling · Targets and triples stubs

13. The Rust Ecosystem

Section Here Status
What's Out There? — tools, libraries Cargo subcommands worth knowing · The string crates · Search tools in Rust stub + lessons
Patterns in the Wild — index pointers, drop guards, extension traits, crate preludes Indices instead of references · Drop guards · Extension traits · A crate prelude stubs + lesson
Staying Up to Date, What Next? Resources · Going deeper lessons

See also

Po polsku

Ta strona to mapa książki Rust for Rustaceans Jona Gjengseta, rozdział po rozdziale: przy każdej sekcji jest strona tej biblioteki, która ją omawia — gotowa lekcja, szkic (stub) z wypisanymi pytaniami albo nazwana luka. Książka nie jest darmowa, więc nie ma tu cytatów, tylko nazwy rozdziałów i sekcji, które nie zmieniają się między wydrukami.

Szukaj po polsku: Rust for Rustaceans po polsku · zaawansowany Rust · rust for rustaceans chapter summary · jon gjengset crust of rust