1 | [package] |
2 | edition = "2018" |
3 | name = "mio" |
4 | # When releasing to crates.io: |
5 | # - Update CHANGELOG.md. |
6 | # - Create git tag |
7 | version = "0.8.11" |
8 | license = "MIT" |
9 | authors = [ |
10 | "Carl Lerche <me@carllerche.com>" , |
11 | "Thomas de Zeeuw <thomasdezeeuw@gmail.com>" , |
12 | "Tokio Contributors <team@tokio.rs>" , |
13 | ] |
14 | description = "Lightweight non-blocking I/O." |
15 | homepage = "https://github.com/tokio-rs/mio" |
16 | repository = "https://github.com/tokio-rs/mio" |
17 | readme = "README.md" |
18 | keywords = ["io" , "async" , "non-blocking" ] |
19 | categories = ["asynchronous" ] |
20 | include = [ |
21 | "Cargo.toml" , |
22 | "LICENSE" , |
23 | "README.md" , |
24 | "CHANGELOG.md" , |
25 | "src/**/*.rs" , |
26 | "examples/**/*.rs" , |
27 | ] |
28 | |
29 | # For documentation of features see the `mio::features` module. |
30 | [features] |
31 | # By default Mio only provides a shell implementation. |
32 | default = ["log" ] |
33 | |
34 | # Enables the `Poll` and `Registry` types. |
35 | os-poll = [] |
36 | # Enables additional OS specific extensions, e.g. Unix `pipe(2)`. |
37 | os-ext = [ |
38 | "os-poll" , |
39 | "windows-sys/Win32_System_Pipes" , |
40 | "windows-sys/Win32_Security" , |
41 | ] |
42 | # Enables `mio::net` module containing networking primitives. |
43 | net = [] |
44 | |
45 | [dependencies] |
46 | log = { version = "0.4.8" , optional = true } |
47 | |
48 | [target.'cfg(unix)'.dependencies] |
49 | libc = "0.2.149" |
50 | |
51 | [target.'cfg(windows)'.dependencies.windows-sys] |
52 | version = "0.48" |
53 | features = [ |
54 | "Win32_Foundation" , # Basic types eg HANDLE |
55 | "Win32_Networking_WinSock" , # winsock2 types/functions |
56 | "Win32_Storage_FileSystem" , # Enables NtCreateFile |
57 | "Win32_System_IO" , # IO types like OVERLAPPED etc |
58 | "Win32_System_WindowsProgramming" , # General future used for various types/funcs |
59 | ] |
60 | |
61 | [target.'cfg(target_os = "wasi")'.dependencies] |
62 | wasi = "0.11.0" |
63 | libc = "0.2.149" |
64 | |
65 | [dev-dependencies] |
66 | env_logger = { version = "0.9.3" , default-features = false } |
67 | rand = "0.8" |
68 | |
69 | [package.metadata.docs.rs] |
70 | all-features = true |
71 | rustdoc-args = ["--cfg" , "docsrs" , "--generate-link-to-definition" ] |
72 | targets = [ |
73 | "aarch64-apple-ios" , |
74 | "aarch64-linux-android" , |
75 | "wasm32-wasi" , |
76 | "x86_64-apple-darwin" , |
77 | "x86_64-pc-windows-msvc" , |
78 | "x86_64-unknown-dragonfly" , |
79 | "x86_64-unknown-freebsd" , |
80 | "x86_64-unknown-illumos" , |
81 | "x86_64-unknown-linux-gnu" , |
82 | "x86_64-unknown-netbsd" , |
83 | "x86_64-unknown-openbsd" , |
84 | ] |
85 | |
86 | [package.metadata.playground] |
87 | features = ["os-poll" , "os-ext" , "net" ] |
88 | |
89 | [[example]] |
90 | name = "tcp_server" |
91 | required-features = ["os-poll" , "net" ] |
92 | |
93 | [[example]] |
94 | name = "tcp_listenfd_server" |
95 | required-features = ["os-poll" , "net" ] |
96 | |
97 | [[example]] |
98 | name = "udp_server" |
99 | required-features = ["os-poll" , "net" ] |
100 | |