|
| 1 | +# Bibliography and Sources |
| 2 | + |
| 3 | +The writing on the material in this book is mostly scattered: official documentation, RFCs, blog posts by Rust team members, and a few books. Here are the sources this book drew on, organized roughly by chapter. |
| 4 | + |
| 5 | +## Official documentation |
| 6 | + |
| 7 | +- *The Rust Programming Language* — [doc.rust-lang.org/book](https://doc.rust-lang.org/book/). The prerequisite. If anything in this book felt like it skipped the basics, the basics are here. |
| 8 | +- *The Rust Reference* — [doc.rust-lang.org/reference](https://doc.rust-lang.org/reference/). The formal description of the language. Dense, accurate, occasionally the only authoritative source for an obscure question. |
| 9 | +- *The Rustonomicon* — [doc.rust-lang.org/nomicon](https://doc.rust-lang.org/nomicon/). Subtitle: *The Dark Arts of Advanced and Unsafe Rust Programming*. Mostly about unsafe code, but the chapters on subtyping, variance, and lifetimes are the canonical references for chapters 1 and 2 of this book. |
| 10 | +- *Asynchronous Programming in Rust* — [rust-lang.github.io/async-book](https://rust-lang.github.io/async-book/). The official introduction to async. The chapter on the executor model and `Pin` is particularly good. |
| 11 | + |
| 12 | +## Posts by Rust team members and async working group |
| 13 | + |
| 14 | +- **Niko Matsakis** ([smallcultfollowing.com/babysteps](https://smallcultfollowing.com/babysteps/)) — the canonical source for type system internals. Posts on lifetime inference, HRTB, async traits, and the implementation of NLL (non-lexical lifetimes) are essential reading. |
| 15 | +- **Aaron Turon** ([aturon.github.io/blog](https://aturon.github.io/blog/)) — laid the foundation for Rust's async model in 2016. The posts on zero-cost futures, abstraction without overhead, and the design of trait objects are still relevant. |
| 16 | +- **Withoutboats** ([without.boats](https://without.boats/)) — the design history of `Pin`, the early thinking on async, and several posts on what the language could have been. Disagrees with later async direction in places; worth reading regardless. |
| 17 | +- **Ralf Jung** ([ralfj.de/blog](https://www.ralfj.de/blog/)) — the formal model of Rust's memory and aliasing. Stacked Borrows, Tree Borrows, and Miri all originate here. Essential if you write unsafe. |
| 18 | +- **Alice Ryhl** ([ryhl.io/blog](https://ryhl.io/blog/)) — practical async patterns. *Actors with Tokio* is the canonical reference for the actor pattern; *Async: What is blocking?* is the canonical reference for the blocking-vs-async distinction. |
| 19 | +- The [Rust async working group's vision document](https://rust-lang.github.io/wg-async/vision.html) — the roadmap for async Rust as of 2026. |
| 20 | + |
| 21 | +## Books |
| 22 | + |
| 23 | +- *Rust for Rustaceans* by Jon Gjengset (No Starch Press, 2021). The closest thing to a prerequisite for this book in print form. Covers async, lifetimes, and unsafe at the level of someone who is past the basics but not yet at the limits. |
| 24 | +- *Programming Rust* (2nd ed.) by Jim Blandy, Jason Orendorff, Leonora Tindall (O'Reilly, 2021). Comprehensive reference, treats lifetimes carefully, has a useful chapter on async. |
| 25 | +- *Zero To Production In Rust* by Luca Palmieri (self-published, ongoing). Async Rust applied to a real production system. Worth reading for the patterns it shows by example. |
| 26 | + |
| 27 | +## Videos |
| 28 | + |
| 29 | +- Jon Gjengset's [Crust of Rust](https://www.youtube.com/playlist?list=PLqbS7AVVErFiWDOAVrPt7aYmnuuOLYvOa) series — long-form livecoding walking through advanced Rust topics. The episodes on async, `Pin`, and lifetimes are excellent supplements to the corresponding chapters here. |
| 30 | +- The [RustConf](https://www.youtube.com/@rustvideos) talks on async internals from various years. Search for "async" plus "Niko Matsakis" or "Tyler Mandry" or "Eric Holk." |
| 31 | + |
| 32 | +## RFCs |
| 33 | + |
| 34 | +The relevant RFCs for the material in this book: |
| 35 | + |
| 36 | +- [RFC 0066](https://rust-lang.github.io/rfcs/0066-better-temporary-lifetimes.html) — temporary lifetimes. |
| 37 | +- [RFC 1214](https://rust-lang.github.io/rfcs/1214-projections-lifetimes-and-wf.html) — projections, lifetimes, and well-formedness. |
| 38 | +- [RFC 2349](https://rust-lang.github.io/rfcs/2349-pin.html) — `Pin`. |
| 39 | +- [RFC 2394](https://rust-lang.github.io/rfcs/2394-async_await.html) — `async`/`await` syntax. |
| 40 | +- [RFC 2592](https://rust-lang.github.io/rfcs/2592-futures.html) — the `Future` trait in `std`. |
| 41 | +- [RFC 3185](https://rust-lang.github.io/rfcs/3185-static-async-fn-in-trait.html) — `async fn` in traits, the static-dispatch case. |
| 42 | +- [RFC 3425](https://rust-lang.github.io/rfcs/3425-return-position-impl-trait-in-traits.html) — return-position `impl Trait` in traits. |
| 43 | + |
| 44 | +## Crates referenced |
| 45 | + |
| 46 | +- [`tokio`](https://docs.rs/tokio/) — the dominant async runtime. |
| 47 | +- [`async-trait`](https://docs.rs/async-trait/) — boxed-future trait macro. |
| 48 | +- [`trait-variant`](https://docs.rs/trait-variant/) — generates boxed variants of native async traits. |
| 49 | +- [`pin-project`](https://docs.rs/pin-project/) and [`pin-project-lite`](https://docs.rs/pin-project-lite/) — safe `Pin` projection. |
| 50 | +- [`bytemuck`](https://docs.rs/bytemuck/) — safe transmutation. |
| 51 | +- [`ouroboros`](https://docs.rs/ouroboros/) — self-referential structs without writing `unsafe`. |
| 52 | +- [`crossbeam`](https://docs.rs/crossbeam/) — lock-free data structures. |
| 53 | +- [`parking_lot`](https://docs.rs/parking_lot/) — faster `Mutex`/`RwLock` than `std`. |
| 54 | +- [`embassy`](https://embassy.dev/) — async runtime for embedded. |
| 55 | + |
| 56 | +## Where to go after this book |
| 57 | + |
| 58 | +This book is a survival guide. To go deeper, in roughly this order: |
| 59 | + |
| 60 | +1. Write more code in the patterns from chapter 9 until they are reflexive. |
| 61 | +2. Read the source of `tokio`, particularly the `task` and `sync` modules. Surprisingly readable. |
| 62 | +3. Read the source of `pin-project` to see what safe pin projection looks like in practice. |
| 63 | +4. Read Niko's blog backwards in time, starting from the most recent posts about async. |
| 64 | +5. Pick a small `unsafe`-using crate (`bytes`, `parking_lot`, or `crossbeam`) and read its `unsafe` blocks; check the safety comments against your understanding. |
| 65 | +6. Run Miri on your own code if you have any. Even if you don't have `unsafe`, Miri will catch some categories of bugs in dependencies. |
| 66 | + |
| 67 | +The material in this book gets internalized by use, not by reading. Write more code. Hit more walls. Each wall, eventually, becomes a door. |
0 commit comments