this post was submitted on 12 Jun 2026
9 points (100.0% liked)

Rust

8066 readers
5 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
 

Who Runs Your Rust Future? Hands-On Intro to Async Rust

I wrote a hands-on intro to async Rust where you build a future and the runner that drives it. It assumes you've written async/await in JS and know Rust basics (structs, enums, closures). No prior async Rust needed.

What the first chapter covers:

  • Who actually runs your async code in Rust
  • What calling an async function actually does, compared to a JS Promise
  • What 'running' a future actually means, step by step
  • The waker: how a future says when it's worth polling again, so you can sleep instead of spinning the CPU
  • Building a Oneshot channel by hand
  • Writing block_on, a runner that drives a future to completion

Everything is built from std only, no dependencies. Also, this chapter is a part of a bigger series that goes deep into async Rust.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here