Evan Relf

Moving Between Sync and Async Rust

Here's a handy cheat sheet for moving between sync and async Rust when using the tokio and/or smol runtimes.

tokio ecosystem

smol ecosystem

The smol crate just re-exports other smaller crates.


You can use things from the smol ecosystem with tokio, or vice versa, using one of these:

smol and tokio both use the same Stream trait from futures-core.