Hacker News new | ask | show | jobs
by son_ngu 2055 days ago
What do you mean by incompatible runtimes, can you give an example?
1 comments

Yes,

https://blog.logrocket.com/a-practical-guide-to-async-in-rus...

> Some libraries require you to use a specific runtime because they rely on runtime internals to provide a solid API for you to use or wrap their own API around an existing runtime. One example is the actix_web web framework, which wraps its own API around tokio.

So if you want to use two libraries that follow this approach, now you have faced with the hurdle to combine two async/await runtimes into the application.

Even C++ knows better in this regard.

We had this discussion before. Please don't repeat wrong statements over and over. C++ is in no ways different from Rust in this regard - they all just provide a coroutine transformation and future type, but not a builtin executor. And there is nothing more interoperable about C++ solution than about Rusts.

Actually Rust ones might even be better, since there is at least a well-defined interface that executors should follow (through the `Waker` type). The C++ executor interface discussion is probably older than the coroutines proposal, but afaik there still hasn't happened any standardization.