Cargo Features

Tokio has no features set by default.

[dependencies]
tokio = { version = "1.37.0", features = ["full", "fs", "io-util", "io-std", "macros", "net", "process", "rt", "rt-multi-thread", "signal", "time", "test-util", "tracing"] }
default

Include nothing by default

full = fs, io-std, io-util, macros, net, parking_lot, process, rt, rt-multi-thread, signal, sync, time

enable everything

fs full?
io-util full? = bytes
io-std full?

stdin, stdout, stderr

macros full? = tokio-macros
net full? = libc, socket2

Enables net, os-ext and os-poll of mio, Win32_Foundation, Win32_Security, Win32_Storage_FileSystem, Win32_System_Pipes and Win32_System_SystemServices of windows-sys ^0.48

Affects doc::os

process full? = bytes, libc, signal-hook-registry

Enables net, os-ext and os-poll of mio, Win32_Foundation, Win32_System_Threading and Win32_System_WindowsProgramming of windows-sys ^0.48

rt full? rt-multi-thread? test-util?

Includes basic task execution capabilities

rt-multi-thread full? = num_cpus, rt
signal full? = libc, signal-hook-registry

Enables net, os-ext and os-poll of mio, Win32_Foundation and Win32_System_Console of windows-sys ^0.48

sync time full? test-util?
test-util = rt, sync, time

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

tokio-macros macros?
bytes io-util? process?

Enables bytes

Everything else is optional...

mio net? process? signal?
num_cpus rt-multi-thread?
parking_lot full?
tracing tokio_unstable implicit feature

Enables tracing

tracing:

Application-level tracing for Rust

Affects join_set::Builder

socket2 not wasm net?
signal-hook-registry unix process? signal?
libc unix net? process? signal?
windows-sys win net? process? signal?

Enables windows-sys ^0.48