Cargo Features

tokio_wasi has no features set by default.

[dependencies]
tokio_wasi = { version = "1.25.2", features = ["full", "fs", "io-util", "io-std", "macros", "net", "process", "rt", "rt-multi-thread", "signal", "time", "test-util", "stats", "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, memchr
io-std full?

stdin, stdout, stderr

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

Enables Win32_Security, Win32_Storage_FileSystem, Win32_System_Pipes and Win32_System_SystemServices of windows-sys ^0.45 and os-ext of mio_wasi

mio_wasi:

Enables additional OS specific extensions, e.g. Unix pipe(2).

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

Enables os-ext of mio_wasi, Win32_System_Threading and Win32_System_WindowsProgramming of windows-sys ^0.45

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 os-ext of mio_wasi, Win32_System_Console of windows-sys ^0.45

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

Technically, removing this is a breaking change even though it only ever did anything with the unstable flag on. It is probably safe to get rid of it after a few releases.

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?

Enables tokio-macros ^1.7.0

bytes io-util? process?

Enables bytes

Everything else is optional...

memchr io-util?
mio_wasi 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 wasm32 wasm64 net?

Enables socket2 ^0.4.4

wasmedge_wasi_socket wasi net?
signal-hook-registry unix process? signal?
libc unix net? process? signal?
windows-sys docsrs win net? process? signal?

Enables windows-sys ^0.45