CodeVetter · Repo Unpack · System map
tokio-rs/tokio
The repository is a Cargo workspace organized around a public runtime crate and companion libraries. Applications enter through Rust APIs or generated main/test wrappers; scheduler and driver implementations remain internal. State lives primarily in memory, while filesystem and subprocess APIs cross into operating-system resources. CI and documentation hosting are separate operational surfaces.
- Cargo.toml defines five public crates and five internal workspace members, with crates.io patches redirecting companion dependencies to local source.
- The tokio facade exposes feature-gated fs, process, runtime, signal, sync, task, and time modules; spawn is re-exported when rt is enabled.
- Builder::build selects current-thread or multi-thread construction; Runtime::block_on enters runtime context before dispatching to that scheduler.
- The multi-thread scheduler owns workers with transferable cores; its implementation explicitly describes work stealing and core handoff during block_in_place.
- Driver::new assembles I/O, signal, clock, and timer components; disabled I/O or timer access produces explicit enable_io/enable_time panic messages.
- The blocking pool handles non-async work, growing to a configured thread limit and queuing further requests; task::spawn_blocking delegates to runtime infrastructure.
- Companion boundaries separate stream adapters, feature-gated utility modules, procedural runtime wrappers, and testing helpers rather than embedding them all in tokio.
- CI defines nextest and doctest commands across Windows, Linux, and macOS; Netlify builds nightly API documentation into target/doc and redirects / to /tokio.