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