A Java VM implementation of Reactive Extensions for composing asynchronous and event-based programs with observable sequences.
tokio-rs/tokio
An asynchronous runtime for Rust providing task scheduling, non-blocking I/O, networking, and timers for building reliable network applications.
- Stars
- 33,502
- Forks
- 5,781
- Open issues
- 440
- Last commit
- 10 hours ago
What is it?
Tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications in Rust. It bundles a multithreaded, work-stealing task scheduler, a reactor backed by the operating system's event queue (epoll, kqueue, IOCP and similar), and asynchronous TCP and UDP sockets.
It targets developers building network services and other I/O-heavy programs who need many concurrent connections without dedicating a thread to each one. Applications enable the feature flags they need, then use async/await with the runtime's spawn, timers, and synchronization primitives.
The project is part of a wider ecosystem that includes the axum web framework, hyper HTTP implementation, tonic gRPC library, tower middleware abstractions, and the tracing diagnostics framework.
Key features
- 01Multithreaded, work-stealing task scheduler
- 02Non-blocking TCP and UDP sockets
- 03Reactor built on epoll, kqueue, and IOCP
- 04Timers and async synchronization primitives
- 05Feature flags let projects include only needed components
Use cases
- Building high-concurrency TCP or UDP network servers in Rust
- Writing async clients that call many services concurrently
- Running I/O-bound background tasks with timers and cancellation
Quick start
- 1
Add Tokio to Cargo.toml with the full feature set
tokio = { version = "1.54.1", features = ["full"] } - 2
Write the TCP echo server example in main.rs and run the project with cargo
Things to know
- Requires the Rust toolchain, with a minimum supported Rust version of 1.85.
- Tokio is a runtime library, so it is only useful inside a Rust project that you build yourself.
Topics
FAQ
- What is tokio?
- An asynchronous runtime for Rust providing task scheduling, non-blocking I/O, networking, and timers for building reliable network applications. Tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications in Rust. It bundles a multithreaded, work-stealing task scheduler, a reactor backed by the operating system's event queue (epoll, kqueue, IOCP and similar), and asynchronous TCP and UDP sockets.
- Is tokio free to use? What license does it have?
- tokio is open source under the MIT license. Check the license terms before using it in commercial products.
- Is tokio still maintained?
- Actively maintained. The last commit to tokio was on Oct 24, 2026.
- What can I use tokio for?
- Building high-concurrency TCP or UDP network servers in Rust Writing async clients that call many services concurrently Running I/O-bound background tasks with timers and cancellation
- How do I install tokio?
- Add Tokio to Cargo.toml with the full feature set: tokio = { version = "1.54.1", features = ["full"] } Write the TCP echo server example in main.rs and run the project with cargo
- Where can I get tokio?
- The source code and installation instructions are on GitHub: https://github.com/tokio-rs/tokio
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A small add-on for Python's requests library that sends HTTP requests asynchronously using concurrent.futures.
An asynchronous, event-driven Java framework for building maintainable, high-performance network protocol servers and clients.
A C library providing cross-platform asynchronous I/O, the event loop underneath Node.js.
A C++11 parallel computing and asynchronous networking framework used in Sogou's back-end services, for building DAG-based task workflows.
A minimal Rust CLI that exposes a local TCP port to a remote server, so localhost services can be reached from the public internet.