Async for Rusts
Async Rust uses async functions and the await keyword to run many tasks on few threads, mostly for network programs. Futures are lazy and need a runtime such as Tokio to execute them. This unit also covers networking with sockets and HTTP clients and servers built on that runtime.
Stage: Concurrency and Async · Part of the Rust roadmap · Last reviewed 19 November 2026
What to learn in Async
- Write an async fn and await its result
- Run tasks concurrently with tokio::spawn and join
- Build a TCP echo server with Tokio
- Explain why blocking calls inside async code cause stalls
- Make an HTTP request and handle its response
Async interview questions
Why does Rust need an external runtime for async code?
The language provides async and await syntax and the Future trait, but not an executor to poll futures or drive I/O. Runtimes such as Tokio supply the scheduler, timers and networking. Leaving it out of the standard library lets projects pick a runtime that fits.
What happens if you call a blocking function inside an async task?
It occupies the runtime's worker thread, so other tasks on that thread cannot make progress and latency rises. Move blocking work to spawn_blocking or a dedicated thread, or use the async version of the API.
Where Async fits in the Rust roadmap
Async belongs to the Concurrency and Async stage (advanced level), which takes about 28 hours. Fearless concurrency.