Re:Improving Interoperability Between Rust and C++
by cmrdporcupine on Monday February 05, 2024 @01:34PM
(#39264932)
On the async front, more work needs to be done to allow a more "plug and play" scenario for async runtimes. Standard APIs/traits for task spawning & mgmt, channels, locks, etc. Because right now it's not really feasible to write a library in an async-agnostic way, and tokio just owns the field even in places where it's not really appropriate or the best choice.
The "default" is tokio, and I think even the tokio authors would agree that it's neither suitable nor ready to be part of the stdlib.
OTOH, pollster[1] (or something like it) should be pulled into the standard library. Not particularly useful for anybody who wants async, but super useful for anybody who doesn't want async but wants to use a 3rd party crate that includes async.
1: https://docs.rs/pollster/latest/pollster/