this post was submitted on 13 Feb 2024
27 points (96.6% liked)

Rust

7219 readers
77 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 2 years ago
MODERATORS
top 6 comments
sorted by: hot top controversial new old
[–] d_k_bo@feddit.de 8 points 2 years ago

Great post!

I ran into this problem when working with gtk-rs. For every async library that you use, you have to look carefully if it requires a specific runtime. If you want to eg. make a HTTP request with reqwest you need to make sure to spawn a task on a tokio runtime running in the background.

[–] syd@lemy.lol 2 points 2 years ago (1 children)

Well, this one goes to my “save but never read” box.

[–] robinm@programming.dev 6 points 2 years ago (1 children)

You shouldn't, it's short and interesting

[–] syd@lemy.lol 1 points 2 years ago

Yep it was good. I also read original JS version article too 😄

[–] robinm@programming.dev 2 points 2 years ago

Interesting idea indeed. I've never used async yet, but I'm always surprised at how the problem space seems to be much more complicated than what it initially looks like.

[–] Vorpal@programming.dev 1 points 1 year ago

The example FileDescriptorPollContext doesn't really work. What if my runtime uses io-uring instead of polling? Those need very different interfaces to be sound. How do you abstract over that.