this post was submitted on 09 Sep 2023
36 points (97.4% liked)

Rust Programming

8144 readers
2 users here now

founded 6 years ago
MODERATORS
top 4 comments
sorted by: hot top controversial new old
[–] modulus@lemmy.ml 9 points 2 years ago (1 children)

I've had just this case. Wanted to use a particular crate that uses async and it's forcing me to do lots of async things I'm unfamiliar with. I resent it a little, especially for a program that I'm fairly sure will not require concurrency of this sort.

At the same time, maybe I'll get used to async rust if I use it enough. But so far I'm not having a lot of fun with it.

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

It's actually not that hard to use async libraries in sync context. I rarely need that but if I do, I just pull in an executor and write a little extension trait for futures that lets me call .block() instead of .await.

[–] Sibbo@sopuli.xyz 6 points 2 years ago (1 children)

I would really wish that the async ecosystem would not be based around runtimes, but would separate runtimes from async libraries. Like let me do file IO async without having to choose between async-std, Tokio, or whatnot for that.

[–] TheAgeOfSuperboredom@lemmy.ca 1 points 2 years ago

I think it's something being worked on. Unfortunately I can't recall the details offhand.