News for hackers. Stuff that matters.
Re:Async Rust doesn't have to be hard by ibraheemdev on Friday June 03, 2022 @06:01PM (#31614233)
This works with runtime agnostic futures, but you can't do any I/O without requiring a specific runtime. reqwest for example doesn't use a generic block_on, it runs tokio behind the scenes.
Re:Async Rust doesn't have to be hard by armchairhacker on Friday June 03, 2022 @06:38PM (#31614557)
You can spawn a simple Tokio I/O runtime with Builder::new_current_thread().with_io().build().

The catch is that it’s not really “simple”, and idk the performance penalty.