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.36.0" |
10 | edition = "2021" |
11 | rust-version = "1.63" |
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 = [ |
75 | "num_cpus" , |
76 | "rt" , |
77 | ] |
78 | signal = [ |
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 | ] |
87 | sync = [] |
88 | test-util = ["rt" , "sync" , "time" ] |
89 | time = [] |
90 | |
91 | [dependencies] |
92 | tokio-macros = { version = "~2.2.0" , path = "../tokio-macros" , optional = true } |
93 | |
94 | pin-project-lite = "0.2.11" |
95 | |
96 | # Everything else is optional... |
97 | bytes = { version = "1.0.0" , optional = true } |
98 | mio = { version = "0.8.9" , optional = true, default-features = false } |
99 | num_cpus = { version = "1.8.0" , optional = true } |
100 | parking_lot = { version = "0.12.0" , optional = true } |
101 | |
102 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
103 | socket2 = { version = "0.5.5" , optional = true, features = [ "all" ] } |
104 | |
105 | # Currently unstable. The API exposed by these features may be broken at any time. |
106 | # Requires `--cfg tokio_unstable` to enable. |
107 | [target.'cfg(tokio_unstable)'.dependencies] |
108 | tracing = { version = "0.1.25" , default-features = false, features = ["std" ], optional = true } # Not in full |
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_taskdump)'.dependencies] |
113 | backtrace = { version = "0.3.58" } |
114 | |
115 | [target.'cfg(unix)'.dependencies] |
116 | libc = { version = "0.2.149" , optional = true } |
117 | signal-hook-registry = { version = "1.1.1" , optional = true } |
118 | |
119 | [target.'cfg(unix)'.dev-dependencies] |
120 | libc = { version = "0.2.149" } |
121 | nix = { version = "0.27.1" , default-features = false, features = ["fs" , "socket" ] } |
122 | |
123 | [target.'cfg(windows)'.dependencies.windows-sys] |
124 | version = "0.48" |
125 | optional = true |
126 | |
127 | [target.'cfg(windows)'.dev-dependencies.windows-sys] |
128 | version = "0.48" |
129 | features = [ |
130 | "Win32_Foundation" , |
131 | "Win32_Security_Authorization" , |
132 | ] |
133 | |
134 | [dev-dependencies] |
135 | tokio-test = { version = "0.4.0" , path = "../tokio-test" } |
136 | tokio-stream = { version = "0.1" , path = "../tokio-stream" } |
137 | futures = { version = "0.3.0" , features = ["async-await" ] } |
138 | mockall = "0.11.1" |
139 | async-stream = "0.3" |
140 | |
141 | [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] |
142 | socket2 = "0.5.5" |
143 | tempfile = "3.1.0" |
144 | |
145 | [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dev-dependencies] |
146 | rand = "0.8.0" |
147 | |
148 | [target.'cfg(all(target_family = "wasm", not(target_os = "wasi")))'.dev-dependencies] |
149 | wasm-bindgen-test = "0.3.0" |
150 | |
151 | [target.'cfg(target_os = "freebsd")'.dev-dependencies] |
152 | mio-aio = { version = "0.8.0" , features = ["tokio" ] } |
153 | |
154 | [target.'cfg(loom)'.dev-dependencies] |
155 | loom = { version = "0.7" , features = ["futures" , "checkpoint" ] } |
156 | |
157 | [package.metadata.docs.rs] |
158 | all-features = true |
159 | # enable unstable features in the documentation |
160 | rustdoc-args = ["--cfg" , "docsrs" , "--cfg" , "tokio_unstable" , "--cfg" , "tokio_taskdump" ] |
161 | # it's necessary to _also_ pass `--cfg tokio_unstable` and `--cfg tokio_taskdump` |
162 | # to rustc, or else dependencies will not be enabled, and the docs build will fail. |
163 | rustc-args = ["--cfg" , "tokio_unstable" , "--cfg" , "tokio_taskdump" ] |
164 | |
165 | [package.metadata.playground] |
166 | features = ["full" , "test-util" ] |
167 | |
168 | [package.metadata.cargo_check_external_types] |
169 | # The following are types that are allowed to be exposed in Tokio's public API. |
170 | # The standard library is allowed by default. |
171 | allowed_external_types = [ |
172 | "bytes::buf::buf_impl::Buf" , |
173 | "bytes::buf::buf_mut::BufMut" , |
174 | |
175 | "tokio_macros::*" , |
176 | ] |
177 | |