Async crate comparison

This article contains information about some of the most popular crates in the asynchronous Rust ecosystem.

Runtimes
The standard library provides no tools for executing asynchronous code, so you need an external library for this purpose. Such a library is often called an executor or runtime.

Besides just executing asynchronous code, runtimes usually provide IO and timer utilities as those features require external code running outside of the asynchronous task itself, and the runtime is a natural place to put them. One downside to this approach is that the IO and timer utilities are tied to that particular runtime.

Tokio
The oldest and most widely used asynchronous runtime still in development, surpassing all other runtimes in usage combined. Created in 2016 by Carl Lerche, who is also the author of mio.

Highlights

 * Tokio provides many utilities for working with asynchronous code. This includes IO and timer utilities, which are tied to the Tokio runtime.
 * IO is based on the mio crate.
 * Supports several schedulers, configurable by user. Runtime is started manually by user with a function or #[tokio::main] macro.

Actix
Actor system created in 2017 with a focus on type-safe actor model and extensibility. Uses Tokio under the hood.

embrio
Runtime intended for embedded systems, developed by Wim Looman since 2018.

Bastion
Conceived in July 2019 by Mahmut Bulut, Bastion pivots towards supervision and fault tolerance in the spirit of Erlang.

async-std
Originally published in August 2019 by Stjepan Glavina, with the aim of developing a full runtime whose API is closer to Rust’s standard library than Tokio’s is. The original author left the project in early 2020 to work on another runtime, and Yoshua Wuyts is the current lead of the project.

async-std is the second most widely used runtime.

Highlights

 * async-std provides a single global runtime, which is started on first use.
 * async-std provides many utilities for working with asynchronous code. This includes IO and timer utilities, which are tied to the async-std runtime.
 * IO is based on the mio crate.

smol
Stjepan Glavina’s second runtime, released in April 2020. One of its core selling points is the small size of the source code.

Highlights

 * Provides one global and per-thread runtimes without customization that are started on first use.
 * Includes I/O and a limited set of timer utilities.
 * Does not use external crates for IO.

futures-rs
Originally the foundational async crate with Future trait definition and other required types, most important part of which have since been moved into Rust standard library.

Currently notable for the Stream trait and one of AsyncRead and AsyncWrite trait variants. Counterparts for all other utilities are usually included as part of other runtimes.

rotor
The oldest asynchronous runtime ever developed for Rust which included its own vision of Future trait. Eventually deprecated by the currently dominant tokio stack.