Cargo Features

tokio_wasi has no features set by default.

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", "mio_wasi", "tracing", "windows-sys"] }

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 os-poll, os-ext and net of mio_wasi, Win32_Foundation, Win32_Security, Win32_Storage_FileSystem, Win32_System_Pipes and Win32_System_SystemServices of windows-sys ^0.45

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

Enables os-poll, os-ext and net of mio_wasi, Win32_Foundation, 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-poll, net and os-ext of mio_wasi, Win32_Foundation and Win32_System_Console of windows-sys ^0.45

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

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.

tokio-macros macros?

Enables tokio-macros ^1.7.0

bytes io-util? process?

With default (std)

memchr io-util?

With default (std)

mio_wasi implicit feature

With wasmedge, os-poll, net and default features

num_cpus rt-multi-thread?
parking_lot full?
tracing cfg(tokio_unstable) implicit feature

With std

Affects join_set::Builder

windows-sys implicit feature


socket2 cfg(not(any(target_arch = "wasm32", target_arch = "wasm64"))) net?

Enables all of socket2 ^0.4.4

wasmedge_wasi_socket cfg(target_os = "wasi") net?

With default features

signal-hook-registry cfg(unix) process? signal?
libc cfg(unix) net? process? signal?

With default (std)