1[package] 2name = "tokio" 3# When releasing to crates.io: 4# - Remove path dependencies 5# - Update doc url 6# - README.md 7# - Update CHANGELOG.md. 8# - Create "v1.x.y" git tag. 9version = "1.32.0" 10edition = "2021" 11rust-version = "1.63" 12authors = ["Tokio Contributors <team@tokio.rs>"] 13license = "MIT" 14readme = "README.md" 15repository = "https://github.com/tokio-rs/tokio" 16homepage = "https://tokio.rs" 17description = """ 18An event-driven, non-blocking I/O platform for writing asynchronous I/O 19backed applications. 20""" 21categories = ["asynchronous", "network-programming"] 22keywords = ["io", "async", "non-blocking", "futures"] 23 24[features] 25# Include nothing by default 26default = [] 27 28# enable everything 29full = [ 30 "fs", 31 "io-util", 32 "io-std", 33 "macros", 34 "net", 35 "parking_lot", 36 "process", 37 "rt", 38 "rt-multi-thread", 39 "signal", 40 "sync", 41 "time", 42] 43 44fs = [] 45io-util = ["bytes"] 46# stdin, stdout, stderr 47io-std = [] 48macros = ["tokio-macros"] 49net = [ 50 "libc", 51 "mio/os-poll", 52 "mio/os-ext", 53 "mio/net", 54 "socket2", 55 "windows-sys/Win32_Foundation", 56 "windows-sys/Win32_Security", 57 "windows-sys/Win32_Storage_FileSystem", 58 "windows-sys/Win32_System_Pipes", 59 "windows-sys/Win32_System_SystemServices", 60] 61process = [ 62 "bytes", 63 "libc", 64 "mio/os-poll", 65 "mio/os-ext", 66 "mio/net", 67 "signal-hook-registry", 68 "windows-sys/Win32_Foundation", 69 "windows-sys/Win32_System_Threading", 70 "windows-sys/Win32_System_WindowsProgramming", 71] 72# Includes basic task execution capabilities 73rt = [] 74rt-multi-thread = [ 75 "num_cpus", 76 "rt", 77] 78signal = [ 79 "libc", 80 "mio/os-poll", 81 "mio/net", 82 "mio/os-ext", 83 "signal-hook-registry", 84 "windows-sys/Win32_Foundation", 85 "windows-sys/Win32_System_Console", 86] 87sync = [] 88test-util = ["rt", "sync", "time"] 89time = [] 90 91# Technically, removing this is a breaking change even though it only ever did 92# anything with the unstable flag on. It is probably safe to get rid of it after 93# a few releases. 94stats = [] 95 96[dependencies] 97tokio-macros = { version = "~2.1.0", path = "../tokio-macros", optional = true } 98 99pin-project-lite = "0.2.11" 100 101# Everything else is optional... 102bytes = { version = "1.0.0", optional = true } 103mio = { version = "0.8.6", optional = true, default-features = false } 104num_cpus = { version = "1.8.0", optional = true } 105parking_lot = { version = "0.12.0", optional = true } 106 107[target.'cfg(not(target_family = "wasm"))'.dependencies] 108socket2 = { version = "0.5.3", optional = true, features = [ "all" ] } 109 110# Currently unstable. The API exposed by these features may be broken at any time. 111# Requires `--cfg tokio_unstable` to enable. 112[target.'cfg(tokio_unstable)'.dependencies] 113tracing = { version = "0.1.25", default-features = false, features = ["std"], optional = true } # Not in full 114 115# Currently unstable. The API exposed by these features may be broken at any time. 116# Requires `--cfg tokio_unstable` to enable. 117[target.'cfg(tokio_taskdump)'.dependencies] 118backtrace = { version = "0.3.58" } 119 120[target.'cfg(unix)'.dependencies] 121libc = { version = "0.2.145", optional = true } 122signal-hook-registry = { version = "1.1.1", optional = true } 123 124[target.'cfg(unix)'.dev-dependencies] 125libc = { version = "0.2.149" } 126nix = { version = "0.28.0", default-features = false, features = ["fs", "socket"] } 127 128[target.'cfg(windows)'.dependencies.windows-sys] 129version = "0.48" 130optional = true 131 132[target.'cfg(windows)'.dev-dependencies.windows-sys] 133version = "0.48" 134features = [ 135 "Win32_Foundation", 136 "Win32_Security_Authorization", 137] 138 139[dev-dependencies] 140tokio-test = { version = "0.4.0", path = "../tokio-test" } 141tokio-stream = { version = "0.1", path = "../tokio-stream" } 142futures = { version = "0.3.0", features = ["async-await"] } 143mockall = "0.11.1" 144async-stream = "0.3" 145 146[target.'cfg(not(target_family = "wasm"))'.dev-dependencies] 147socket2 = "0.5.3" 148tempfile = "3.1.0" 149 150[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies] 151rand = "0.8.0" 152 153[target.'cfg(all(target_family = "wasm", not(target_os = "wasi")))'.dev-dependencies] 154wasm-bindgen-test = "0.3.0" 155 156[target.'cfg(target_os = "freebsd")'.dev-dependencies] 157mio-aio = { version = "0.7.0", features = ["tokio"] } 158 159[target.'cfg(loom)'.dev-dependencies] 160loom = { version = "0.7", features = ["futures", "checkpoint"] } 161 162[package.metadata.docs.rs] 163all-features = true 164# enable unstable features in the documentation 165rustdoc-args = ["--cfg", "docsrs", "--cfg", "tokio_unstable"] 166# it's necessary to _also_ pass `--cfg tokio_unstable` to rustc, or else 167# dependencies will not be enabled, and the docs build will fail. 168rustc-args = ["--cfg", "tokio_unstable"] 169 170[package.metadata.playground] 171features = ["full", "test-util"] 172