async fn from Editor to Executable
summary
A concrete change removes GenFuture from async lowering and replaces generator plumbing with a cleaner identity future approach while keeping explicit resume types to dodge lifetime bugs, using nightly compiler flags to inspect HIR/MIR and type sizes. The work reduces profiler noise and yields small compile-time wins, exposes why mem::size_of of Futures explodes, and shows practical fixes (pin box / pin on stack) that cut an observed sevenfold growth to a reasonable factor in collaboration with the mocha crate author.
AI-written summary · about
chapters (10)
- 0:00Async function compilation
- 3:18Async functions as compiler sugar
- 7:30Generator abstraction and stack traces
- 10:05Lifetime errors and identity future
- 13:00Recap of compiler transformations
- 15:47Futures as state machines
- 17:30Future size growth and workarounds
- 18:55Future optimizations
- 20:42Dangling stack traces on Linux/Mac
- 21:05Summary and closing
related talks
34mLife of an async fn
30mBack to the Futures
31mAsync Rust: Past, Present, and Future
01h 05mLet's write an async runtime
01h 00mContinuable asynchronous programming with allocation aware futures
01h 02mThere is a new future
07mLightning Talk: Async Function Pointers
57m[filtered] Asynchronous C++ Programming
