Paul Krill
Editor at Large

Tokio Rust runtime reaches 1.0 status

news
Jan 8, 20212 mins

Asynchronous runtime for Rust programming language provides building blocks for developing fast and reliable networking applications.

colorful neon networking background
Credit: Thinkstock

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 tracing crate 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.

Tokio has been used to improve network reliability and performance by the likes of Discord, Fly.io, the Zcash Foundation, and the AWS Lambda development team. It also has been used in the Deno runtime for JavaScript and TypeScript. A tutorial has been published on getting started with Tokio.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author