CodeVetter · Repo Unpack · Feature catalog
tokio-rs/tokio
User-facing functionality consists of composable Rust APIs rather than application routes or screens. Tokio provides execution, communication, I/O, timing, and operating-system control, with availability determined by features and targets. Companion libraries expose higher-level framing, cancellation, delayed queues, and stream composition. This catalog groups the inspected API families without claiming every public symbol was examined.
- Execution APIs include spawn, spawn_blocking, yield_now, LocalSet/spawn_local, JoinSet, JoinHandle, and AbortHandle; main/test macros generate runtime construction.
- Networking exposes TCP streams/listeners/sockets, UDP, Unix sockets and FIFO pipes, Windows named pipes, and AsyncFd integration for other I/O resources.
- AsyncRead and AsyncWrite define nonblocking poll interfaces; extension APIs provide operations such as write_all and flush, while filesystem APIs include whole-file writes and synchronization.
- Synchronization exports broadcast, mpsc, oneshot, watch, Mutex, RwLock, Semaphore, Notify, Barrier, OnceCell, and SetOnce.
- Timing APIs include sleep/sleep_until, interval/interval_at with MissedTickBehavior, and timeout/timeout_at; Timeout polls its wrapped future before checking expiration.
- Command supports subprocess spawning and captured output; Child exposes wait-with-output, while signal::ctrl_c provides portable notification through platform implementations.
- tokio-util provides codec, compatibility, I/O, task, and time modules; CancellationToken offers child propagation, and DelayQueue returns keyed values after deadlines.
- tokio-stream supplies StreamExt adapters and resource wrappers; StreamMap merges dynamically inserted streams while preserving each emitted item's source key.