Hi,
I'm trying to understand async-await in Rust, but I'm getting lost in all the different async runtimes.
From my understanding, it's not enough to have a Future
, it should be executed by something (obviously).
Is there a good read on how those async runtimes are generally implemented and what is the difference between them?
I keep seeing different kinds of runtimes, I have already seen at least the following main
macros:
async_std::main
tokio::main
actix_rt::main
And they apparently keep coming, so I would like to know more about how to do housekeeping on them.
It appears to me that those runtimes serve different purposes. For example, Actix runtime is based on Tokio, but apparently it's not possible to simply use #[tokio::main]
with an Actix web server.
I would like to understand what are the implications of using different runtimes. For now it seems to be a topic that blocks me from using async-await without concern.
Thanks!