News for hackers. Stuff that matters.
Re:Portable and Interoperable Async Rust by varajelle on Wednesday December 08, 2021 @10:45AM (#29486120)
The std::future::Future from the rust standard library works with every runtime.

Not sure I understand, what kind of interoperability you are talking about. What kinds of code works in C++ across runtimes, for which the equivalent in Rust doesn't?

Re:Portable and Interoperable Async Rust by pjmlp on Wednesday December 08, 2021 @12:57PM (#29488053)
In C++ you don't have the scenario like in Rust, where one is forced to use a specific async runtime for library xyz, because it depends on having tokio as runtime.

Or has that situation been sorted out by now?

Re:Portable and Interoperable Async Rust by varajelle on Wednesday December 08, 2021 @01:13PM (#29488261)
In Rust you only are forced to use a specific runtime if you want to use its API. For example to spawn new tasks, or to block on a future. I believe that would be the same in C++.

In Rust, you don't need to use a specific runtime if you just want to use async function in your library.