Ever wondered, into what the compiler turns async / await constructs? This is the result of a live coding session performed during the Rust community meeting at bbv on 2026-04-23. It consists of the following parts:
- src/bin/file-processor.rs
-
The original program which is about to be converted in 2 steps. It consists of a quite useless task of reading in 3 files, analyze their content and write the result of that analyze step into 3 output files. It has been generated using Claude Code.
- src/bin/file-processor-step1.rs
-
First step after converting the async function read_file() into a manually desugared function. It mainly shows the transformation of such a function into a state-machine.
- src/bin/file-processor-step2.rs
-
Second step by introducing a quite useless function which counts to 10. It shows what must be done when handling the poll call directly and also shows the importance of triggering the waker.
This project is licensed under the GNU General Public License v3.0.
See the LICENSE file for details, or visit GNU GPL v3.0.