Coroutines: C++ vs Rust

Jonathan Müller

90 minute session
14:30-16:00, Friday, 15th July 2022

C++ and Rust are both system programming languages that recently received support for asynchronous programming using coroutines. Given the memory and time constraints, both languages opted for stackless coroutines implemented by a compiler-generated state machine. However, beyond that the designs are very different: in C++ the awaitables continue a coroutine from the bottom up, whereas in Rust a waker polls a future from the top down.

We'll figure out what this means by exploring how C++ and Rust coroutines work, what sets them apart, and what the trade-offs are. If you like programming language design, this talk is for you.


Jonathan Müller

Jonathan is a Computer Science graduate student also studying Physics. In his spare time he works on various C++ open source libraries for memory allocation, cache-friendly containers or parsing. He also blogs about C++ and library development at