this post was submitted on 25 Sep 2023
27 points (96.6% liked)

Rust

5953 readers
7 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 1 year ago
MODERATORS
 

All these posts about async are making the freedom to choose our runtime seem like a bad thing.

For most people, we can just accept Tokio as the de facto standard, and everything is good. Having the other runtimes only makes things better. Don't do anything weird and it won't be too much work if you need to change.

Any big change you miss is bound to either be implemented in Tokio or be too different for any abstraction to save you from the work.

If you're writing a library that you want to be reusable by everyone, I understand your frustration that it's not easier to make it universal for all async runtimes. You can still choose one, minimize the code you would have to change to implement others, and appreciate that in almost every other programming language you don't get more than one async engine anyway.

top 2 comments
sorted by: hot top controversial new old
[โ€“] pileghoff@programming.dev 6 points 1 year ago

I think this is enviable with low level languages. You simply can't abstract away as many things.

[โ€“] anlumo@feddit.de 6 points 1 year ago* (last edited 1 year ago)

I stopped worrying about this when I had a project with two async runtimes (tokio and bastion) and it worked fine without any special setup.