this post was submitted on 09 Sep 2023
40 points (97.6% liked)

Rust Programming

8176 readers
12 users here now

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] keturn@sh.itjust.works 3 points 1 year ago (1 children)

Yeah, "async is a niche requirement" has long seemed weird to me. Most programs with any degree of interactivity quickly come to a point where they want more than one thing to be happening at once, and they spend some time waiting on external inputs -- whether those are network packets or USB events or timers.

Purely synchronous code only suffices for that narrow and most boring category of programs that know all their inputs up-front and don't accept any other inputs or interactions at all.

[–] anlumo@feddit.de 3 points 1 year ago

Well, CLI tools fall under that category, and they’re not exactly rare to be written in Rust these days.

My most recent one had to use tokio anyways due to a library crate that used it (rtnetlink). Luckily, I don’t mind that at all.