
If you want to use a runtime with an explicitly chosen backend,.However, changing the set of Cargo features available can affect this see īoth of the above methods use the "preferred runtime", which is usually Tokio. Using for anything besides Arti, you can use. If you want to construct a default runtime that you won't be That you built with tokio by running with If you already have an asynchronous backend (for example, one A runtime is a if it can make TLS connections.įor convenience, the trait derives from all the traitsĪbove, plus and.

A runtime is a if it can make and receive TCP.

A runtime is a if it can make timer futures thatīecome Ready after a given interval of time.A runtime is a if it can block on a future.The tor-rtcompat crate provides several traits thatĮncapsulate different runtime capabilities. Replaced) with standardized and general-purpose versions of the We hope that in the future this crate can be replaced (or mostly Plan to include) any functionality beyond what Arti needs to

In the future we hope to add supportĪs such, it does not currently include (or Tasks, along with implementations for these traits for the tokioĪnd async-std runtimes. Of traits that represent a runtime's ability to perform these To solve these problems, the tor-rtcompat crate provides a set are not the same as those provided by tokio, and Runtime libraries, but there are still areas where no standard APIĪdditionally, the AsyncRead and AsyncWrite traits provide by The API abstracts much of the differences among these Rust's support for asynchronous programming is powerful, but stillĪ bit immature: there are multiple powerful runtimes you can use,īut they do not expose a consistent set of interfaces.
