# tokio-rs/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.

Source: https://github.com/tokio-rs/tokio
Indexed: commit 717c508 on 2026-11-21 by Repowise. Facts come from the source and git history, not from the maintainer.

## Facts

- Language: Rust
- Stars: 33,751 at index time
- License: MIT
- Code health: 9.1/10, Excellent
- Last commit: 2026-11-19
- Contributors: 775

## How to use

Add tokio to the [dependencies] section of Cargo.toml with all features enabled.
    tokio = { version = "1.54.1", features = ["full"] }

## How it 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.

- tests-build/src/lib.rs: entry point
- tests-integration/src/lib.rs: entry point
- tokio-macros/src/entry.rs: entry point
- tokio-macros/src/lib.rs: entry point
- tokio-stream/src/lib.rs: entry point
Modules: tokio, tokio-util, tokio-stream, examples, benches, tests-build, tokio-test, tests-integration. 875 files, 108,144 lines, 11,207 symbols.

## Code health

- Score: 9.1/10 (Excellent)
- Rank: not ranked (not on a leaderboard yet)
- Hotspots: tokio/src/runtime/blocking/pool.rs, tokio/src/runtime/scheduler/multi_thread/worker.rs, tokio/src/runtime/builder.rs, tokio/src/runtime/io/driver/uring.rs, tokio/src/process/unix/mod.rs
- Lowest file: tokio/src/sync/batch_semaphore.rs
- Dead code: none found

## Maintenance

- Last commit 2026-11-19, 2,448 commits
- 775 contributors, bus factor 25

## Security

- Security findings are shown to signed-in users at https://repowise.dev/repo/tokio-rs/tokio/security

## More

- Page: https://repowise.dev/repo/tokio-rs/tokio
- Ask this codebase: https://repowise.dev/repo/tokio-rs/tokio/chat
- Docs: https://repowise.dev/repo/tokio-rs/tokio/docs
- MCP (signs in with Repowise on first use):
    claude mcp add --transport http repowise https://api.repowise.dev/mcp/tokio-rs/tokio
