Tokio, an asynchronous runtime for the Rust language, has reached 1.0 status. Designed for writing stable network applications, the runtime includes asynchronous APIs for TCP and UDP, timers, and a multithreaded, work-stealing scheduler.
Available on GitHub, Tokio 1.0 arrived on December 22. First introduced more than four years ago, Tokio has since become easier to use and more powerful, its developers said. But a significant amount of evolution in the project has caused some friction, they noted, with libraries required to track the many changes and confusing error messages resulting from accidental dependence on multiple versions of Tokio. The Tokio 1.0 release ends this “churn.”
There are no current plans for Tokio 2.0, with the developers set to hold back on such a release for at least three years. The Tokio 1.0 branch will be maintained for at least five years. An MSRV (minimum supported Rust version) policy of six months will be maintained. The planned stability, though, does not mean the technology will stagnate, the developers said. During 2021 the project will focus on areas including:
Stream, for asynchronous iteration utilities. Once the Rust standard library provides a Stream trait, stream utilities can be moved into the Tokio crate itself.
io_uring, a Linux interface for asynchronous operations of all types of I/O, including disk, while reducing the number of syscalls. With
io_uring, Tokio can provide genuinely asynchronous file system operations.
tracing, to build a deeper integration between tracing and the rest of the Tokio stack, providing visibility into Tokio internals. This is part of an effort to define a first-class story around operating Tokio applications. The
tracingcrate already provides needed infrastructure. The tracing code ecosystem will grow, too.
- The Tokio stack, with a focus on Tower, a set of reusable components for building reliable clients and servers.