~/talk

Let's write an async runtime

Talkat Rust Nation UK 2026 · on Thursday, 2026-02-19· [rust]
links:none on file
slides:none on file

Builds a tiny single‑threaded Rust executor that implements block_on and spawn, boxes futures as a pinned boxed future, and first uses a busy loop then replaces it with a thread waker (std::thread::unpark + Waker/Context). Tests use nonblocking UnixStream pipes; proof of concept works but spawns a thread per wait, wastes CPU and can exhaust file descriptors, so it’s educational and functional but not production‑grade.

AI-written summary · about

  1. 0:00Introduction
  2. 2:15Async functions and futures in Rust
  3. 7:14Async functions compile to futures
  4. 9:23Pinning and self-referential types
  5. 16:50Why pinning is essential
  6. 20:21Executor trait for naive runtime
  7. 27:29Naive IO stream for testing
  8. 33:52Problems with naive runtime
  9. 38:11Waker and context for tasks
  10. 42:26Runtime with threads and wakers
  11. 43:49Live demo of runtime
  12. 48:24Q&A
  13. 55:25Q&A
  14. 1:03:04Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.