repowiserepowise

tokio-rs / tokio Architecture and code health

A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...

★ 33,751stars on GitHubRustMIT

Claude Code, Cursor, Codex or VS Code. No key. You approve one sign-in in your browser.

Setup instructions on GitHub

Releases on GitHub (latest tokio-1.54.1, Oct 21, 2026)

Repowise maps public repos from their source. Not affiliated with tokio-rs. What is Repowise?

github.com/tokio-rs/tokioIndexed at 717c508

What is tokio?

tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications with Rust. It provides a multithreaded, work-stealing task scheduler, a reactor backed by the operating system's event queue, and asynchronous TCP and UDP sockets. Its core idea is that many tasks share a scheduler while I/O readiness is delivered by the OS event queue, such as epoll, kqueue or IOCP. It is written in Rust. Its code health is 9.1 out of 10 (Excellent). The last commit to tokio was on Nov 19, 2026, and 775 people have contributed.

As of commit 717c508, indexed Nov 21, 2026. What it is comes from a model reading the README; the rest is measured from the source and git history, not from the maintainer.

For agentstokio.md

Repo facts: type, license, health, rank, contributors
tokio facts
LicenseMIT
Code health9.1 / 10 (Excellent)
Health rankNot ranked (not on a leaderboard yet)
Last commitNov 19, 2026
Contributors775
Bus factor25
Size875 files, 108,144 lines

Explore tokio

Ask about this code in your agent

This connects Repowise to tokio's code. It does not install tokio.

Useful if you want to change or fork tokio: your agent can ask how it is put together and get answers that cite its files.

Ask about tokio

Answers come from tokio's README and source, with the files they cite. Two free answers a day without an account.

Featured answer

tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications in Rust, providing a multithreaded, work-stealing task scheduler, a reactor backed by the operating system's event queue (epoll, kqueue or IOCP), and asynchronous TCP and UDP sockets. The core runtime lives in the tokio directory, which holds 576 of the repository's 875 files. A runtime is configured in tokio/src/runtime/builder.rs, spawned tasks run through the worker logic in tokio/src/runtime/scheduler/multi_thread/worker.rs, and blocking work goes to the pool in tokio/src/runtime/blocking/pool.rs so scheduler threads are not stalled. The reactor receives readiness events from the OS through I/O driver files such as tokio/src/runtime/io/driver/uring.rs, while tokio-stream and tokio-macros sit alongside the core with entry points at tokio-stream/src/lib.rs and tokio-macros/src/entry.rs. To start reading, begin with tokio/src/runtime/builder.rs and then the worker file; by file count the layers are Application (425), Utility (66), Docs & Tooling (51), Config (16) and CLI (3).

Files per layer in tokio5 layers.

Basis: Inferred · knowledge graph· as of 717c508

Want this for your own codebase? Map your repo free

About this page

Get a page like this for your own codebase

Repowise built this map of tokio-rs/tokio from its source and git history. It parses every symbol, draws the dependency graph, scores each file's health from complexity, duplication, coverage and churn, finds hotspots and owners in the history, and writes documentation for every module. Your coding agent reads the same index over MCP, so its answers cite real files.

Free for 2 public repos, with a page like this one. No card. See how Repowise works

Prefer local? pip install repowise && repowise init indexes your own checkout, no account needed. Star Repowise on GitHub

tokio-rs/tokio FAQ

What is tokio?

tokio is an event-driven, non-blocking I/O platform for writing asynchronous applications with Rust. It provides a task scheduler, a reactor backed by the operating system's event queue, and asynchronous TCP and UDP sockets.

How does tokio work?

tokio runs tasks on a multithreaded, work-stealing scheduler and uses a reactor backed by the operating system's event queue to wait on I/O. Applications use the asynchronous TCP and UDP sockets that the runtime provides.

How do I install tokio?

tokio is installed as a Cargo dependency. Add it to the [dependencies] section of Cargo.toml with the full feature enabled. Setup instructions on GitHub

What language is tokio written in?

tokio is written in Rust. Its codebase consists of 816 Rust files, and its build manifests use Cargo.

How is the tokio code organized?

tokio holds the core runtime in its tokio directory, which contains 576 files. Other modules include tokio-util, tokio-stream, examples, benches, tests-build, tokio-test and tests-integration.

Who is tokio for?

tokio is for developers who write asynchronous applications in Rust that need non-blocking I/O, networking and task scheduling. It targets applications built with the Rust programming language.

What license does tokio use?

tokio is licensed under MIT, identified as MIT in the repository. Contributions submitted for inclusion are also licensed as MIT.

Code health

9.1out of 10Excellent

Hotspots average 8.2, the place fixes pay off most.

Key features of tokio

  • Provides a multithreaded, work-stealing based task scheduler for running asynchronous work.
  • Includes a reactor backed by the operating system's event queue, such as epoll, kqueue or IOCP.
  • Offers asynchronous TCP and UDP sockets for network applications.
  • Lets users enable feature flags in Cargo.toml, including the full feature set of the tokio crate.

How tokio-rs/tokio works

The tokio directory holds 576 of the repository's 875 files and contains the core runtime. tokio/src/runtime/builder.rs is where a runtime is configured before it starts running. tokio/src/runtime/scheduler/multi_thread/worker.rs contains the worker logic of the multithreaded task scheduler that runs spawned tasks. tokio/src/runtime/blocking/pool.rs manages the pool that runs blocking work so it does not stall the scheduler threads. tokio/src/runtime/io/driver/uring.rs is one of the I/O driver files that the reactor uses to receive readiness events from the operating system. tokio-stream/src/lib.rs and tokio-macros/src/entry.rs are entry points for the tokio-stream and tokio-macros crates, which sit alongside the core crate.

The codebase has 875 files and 11,207 symbols in 10 modules, written in Rust. Code health is 9.1 out of 10, rated excellent.