Rust Async/Await

This cluster discusses the implementation, challenges, and usage of async/await in Rust, focusing on libraries like Tokio, executors, blocking operations, and comparisons to other languages.

➡️ Stable 0.5x Programming Languages
2,161
Comments
16
Years Active
5
Top Authors
#1516
Topic ID

Activity Over Time

2011
1
2012
1
2013
7
2014
13
2015
17
2016
53
2017
66
2018
64
2019
285
2020
168
2021
246
2022
199
2023
433
2024
290
2025
309
2026
9

Keywords

DB futures.rs JS infoq.com ComputeTask SomeState LocalPool LIFO reddit.com github.com async rust await async await runtime library thread blocking function spawn

Sample Comments

swah May 2, 2022 View on HN

I believe I read that Tokio was a "hacky" way to add async to Rust - similar to the solution in the Python space... - is this not the case?

ReactiveJelly Sep 28, 2023 View on HN

You can interoperate async and threads, but yes you have to tolerate having Tokio or similar as a dep

xfer Mar 10, 2021 View on HN

No without compiler support you can't do async in a library. Rust also does async in library so to speak.

oersted Nov 26, 2025 View on HN

Just to note the it's the same in Rust with tokio::spawn (and alternatives).

csomar Jul 5, 2023 View on HN

Not in Rust if you use something like Tokio.

stop50 Mar 28, 2024 View on HN

I think the tokio library does this for rust

zozbot234 Mar 7, 2022 View on HN

Rust 'async' frameworks allow you to issue blocking calls, either by auto-spawning a separate thread or on via a trivial executor that blocks on the current thread.

coolreader18 Dec 24, 2020 View on HN

Those are async tasksOr rather -- async tasks are as close as you can get to green threads in rust without a runtime that would impose overhead on every program

hguant Nov 7, 2019 View on HN

It feels like you're complaining about things in the Rust language without taking the time to understand how the language idioms work. RTFM.Additionally, you're making snarky comments about how you don't like how the base language doesn't handle something like JS...then reference a third party JS library. Base JS doesn't solve your 'problem' either.To answer your question, async/await provides hooks for an executor (tokio being the most common) to ru

pcwalton Aug 17, 2019 View on HN

In Rust you use async/await with a scheduler like mio that will automatically do that for you as well.