| 1 | [package] |
| 2 | name = "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. |
| 9 | version = "1.44.2" |
| 10 | edition = "2021" |
| 11 | rust-version = "1.70" |
| 12 | authors = ["Tokio Contributors <team@tokio.rs>" ] |
| 13 | license = "MIT" |
| 14 | readme = "README.md" |
| 15 | repository = "https://github.com/tokio-rs/tokio" |
| 16 | homepage = "https://tokio.rs" |
| 17 | description = "" " |
| 18 | An event-driven, non-blocking I/O platform for writing asynchronous I/O |
| 19 | backed applications. |
| 20 | " "" |
| 21 | categories = ["asynchronous" , "network-programming" ] |
| 22 | keywords = ["io" , "async" , "non-blocking" , "futures" ] |
| 23 | |
| 24 | [features] |
| 25 | # Include nothing by default |
| 26 | default = [] |
| 27 | |
| 28 | # enable everything |
| 29 | full = [ |
| 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 | |
| 44 | fs = [] |
| 45 | io-util = ["bytes" ] |
| 46 | # stdin, stdout, stderr |
| 47 | io-std = [] |
| 48 | macros = ["tokio-macros" ] |
| 49 | net = [ |
| 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 | ] |
| 61 | process = [ |
| 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 |
| 73 | rt = [] |
| 74 | rt-multi-thread = ["rt" ] |
| 75 | signal = [ |
| 76 | "libc" , |
| 77 | "mio/os-poll" , |
| 78 | "mio/net" , |
| 79 | "mio/os-ext" , |
| 80 | "signal-hook-registry" , |
| 81 | "windows-sys/Win32_Foundation" , |
| 82 | "windows-sys/Win32_System_Console" , |
| 83 | ] |
| 84 | sync = [] |
| 85 | test-util = ["rt" , "sync" , "time" ] |
| 86 | time = [] |
| 87 | |
| 88 | [dependencies] |
| 89 | tokio-macros = { version = "~2.5.0" , path = "../tokio-macros" , optional = true } |
| 90 | |
| 91 | pin-project-lite = "0.2.11" |
| 92 | |
| 93 | # Everything else is optional... |
| 94 | bytes = { version = "1.2.1" , optional = true } |
| 95 | mio = { version = "1.0.1" , optional = true, default-features = false } |
| 96 | parking_lot = { version = "0.12.0" , optional = true } |
| 97 | |
| 98 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
| 99 | socket2 = { version = "0.5.5" , optional = true, features = ["all" ] } |
| 100 | |
| 101 | # Currently unstable. The API exposed by these features may be broken at any time. |
| 102 | # Requires `--cfg tokio_unstable` to enable. |
| 103 | [target.'cfg(tokio_unstable)'.dependencies] |
| 104 | tracing = { version = "0.1.29" , default-features = false, features = ["std" ], optional = true } # Not in full |
| 105 | |
| 106 | # Currently unstable. The API exposed by these features may be broken at any time. |
| 107 | # Requires `--cfg tokio_unstable` to enable. |
| 108 | [target.'cfg(tokio_taskdump)'.dependencies] |
| 109 | backtrace = { version = "0.3.58" } |
| 110 | |
| 111 | [target.'cfg(unix)'.dependencies] |
| 112 | libc = { version = "0.2.168" , optional = true } |
| 113 | signal-hook-registry = { version = "1.1.1" , optional = true } |
| 114 | |
| 115 | [target.'cfg(unix)'.dev-dependencies] |
| 116 | libc = { version = "0.2.168" } |
| 117 | nix = { version = "0.29.0" , default-features = false, features = ["aio" , "fs" , "socket" ] } |
| 118 | |
| 119 | [target.'cfg(windows)'.dependencies.windows-sys] |
| 120 | version = "0.52" |
| 121 | optional = true |
| 122 | |
| 123 | [target.'cfg(windows)'.dev-dependencies.windows-sys] |
| 124 | version = "0.52" |
| 125 | features = [ |
| 126 | "Win32_Foundation" , |
| 127 | "Win32_Security_Authorization" , |
| 128 | ] |
| 129 | |
| 130 | [dev-dependencies] |
| 131 | tokio-test = { version = "0.4.0" , path = "../tokio-test" } |
| 132 | tokio-stream = { version = "0.1" , path = "../tokio-stream" } |
| 133 | futures = { version = "0.3.0" , features = ["async-await" ] } |
| 134 | mockall = "0.11.1" |
| 135 | async-stream = "0.3" |
| 136 | futures-concurrency = "7.6.3" |
| 137 | |
| 138 | [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] |
| 139 | socket2 = "0.5.5" |
| 140 | tempfile = "3.1.0" |
| 141 | proptest = "1" |
| 142 | |
| 143 | [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies] |
| 144 | rand = "0.8.0" |
| 145 | |
| 146 | [target.'cfg(all(target_family = "wasm", not(target_os = "wasi")))'.dev-dependencies] |
| 147 | wasm-bindgen-test = "0.3.0" |
| 148 | |
| 149 | [target.'cfg(target_os = "freebsd")'.dev-dependencies] |
| 150 | mio-aio = { version = "0.9.0" , features = ["tokio" ] } |
| 151 | |
| 152 | [target.'cfg(loom)'.dev-dependencies] |
| 153 | loom = { version = "0.7" , features = ["futures" , "checkpoint" ] } |
| 154 | |
| 155 | [target.'cfg(all(tokio_unstable, target_has_atomic = "64"))'.dev-dependencies] |
| 156 | tracing-mock = "= 0.1.0-beta.1" |
| 157 | |
| 158 | [package.metadata.docs.rs] |
| 159 | all-features = true |
| 160 | # enable unstable features in the documentation |
| 161 | rustdoc-args = ["--cfg" , "docsrs" , "--cfg" , "tokio_unstable" , "--cfg" , "tokio_taskdump" ] |
| 162 | # it's necessary to _also_ pass `--cfg tokio_unstable` and `--cfg tokio_taskdump` |
| 163 | # to rustc, or else dependencies will not be enabled, and the docs build will fail. |
| 164 | rustc-args = ["--cfg" , "tokio_unstable" , "--cfg" , "tokio_taskdump" ] |
| 165 | |
| 166 | [package.metadata.playground] |
| 167 | features = ["full" , "test-util" ] |
| 168 | |
| 169 | [package.metadata.cargo_check_external_types] |
| 170 | # The following are types that are allowed to be exposed in Tokio's public API. |
| 171 | # The standard library is allowed by default. |
| 172 | allowed_external_types = [ |
| 173 | "bytes::buf::buf_impl::Buf" , |
| 174 | "bytes::buf::buf_mut::BufMut" , |
| 175 | "tokio_macros::*" , |
| 176 | ] |
| 177 | |
| 178 | [lints] |
| 179 | workspace = true |
| 180 | |