Zero-Cost Async IO
summary
Rust async/await compiles async functions into tight state machines so generated futures live as a single heap allocation, run on a pull-based executor/reactor loop, and avoid per-callback allocations. The API uses the Pin API to allow references across await points by preventing moves, enabling truly zero-cost abstraction semantics: no global runtime cost and performance as good as hand-written state machines. Pin is stabilized, futures API is imminent, full async/await stabilization targets the coming months.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:09Async/await in Rust
- 4:21Zero-cost abstraction
- 5:46Async IO history in Rust
- 9:24Removed green threads
- 10:47Futures library solution
- 12:58Callback problems
- 14:03Pull-based futures
- 16:52Zero-cost futures
- 18:16Benchmarking futures
- 20:05Combinators to async/await
- 21:51Futures usability issues
- 23:17Error messages and borrowing
- 26:50Pinning self-referential futures
- 29:17Pinning enables async code
- 30:04Async/await status








