Beginner coming across what seems to be 'async hell'

⚓ rust    📅 2025-05-13    👤 surdeus    👁️ 3      

surdeus

I'm 4 weeks into Rust and just go lost in async/await hell.

In my pet project for learning Rust I want to interact with etcd and I came across the etcd-client crate: Dive into async...

I find out about async/await syntax from the Rust book, learn about tokio and async runtimes in general and somehow end up reading The State of Async Rust: Runtimes which paints a somewhat bleak picture, but spurs me to look into alternatives to tokio.

Enter glommio - a single thread per core architecture async runtime, that I would like to use.

So now I am realising that things are not so rosy: it seems async runtimes pollute your code with the specific implementation, therefore I can't use the runtime of my choice (glommio) with the library of my choice (etcd-client)...

As a beginner, this is not something I want to deal with but I am much more inclined to go with glommio and io_uring than tokio...

Any words of wisdom on how to proceed? Is there any way to adapt code written to run with tokio to use glommio? Is there any way to write async code in a runtime-agnostic way? Are there any example libraries like that out there to study?

Thanks!

1 post - 1 participant

Read full topic

🏷️ rust_feed