1[package] 2edition = "2018" 3name = "mio" 4# When releasing to crates.io: 5# - Update CHANGELOG.md. 6# - Create git tag 7version = "0.8.6" 8license = "MIT" 9authors = [ 10 "Carl Lerche <me@carllerche.com>", 11 "Thomas de Zeeuw <thomasdezeeuw@gmail.com>", 12 "Tokio Contributors <team@tokio.rs>", 13] 14description = "Lightweight non-blocking I/O." 15homepage = "https://github.com/tokio-rs/mio" 16repository = "https://github.com/tokio-rs/mio" 17readme = "README.md" 18keywords = ["io", "async", "non-blocking"] 19categories = ["asynchronous"] 20include = [ 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. 32default = [] 33 34# Enables the `Poll` and `Registry` types. 35os-poll = [] 36# Enables additional OS specific extensions, e.g. Unix `pipe(2)`. 37os-ext = [ 38 "os-poll", 39 "windows-sys/Win32_System_Pipes", 40 "windows-sys/Win32_Security", 41] 42# Enables `mio::net` module containing networking primitives. 43net = [] 44 45[dependencies] 46log = "0.4.8" 47 48[target.'cfg(unix)'.dependencies] 49libc = "0.2.121" 50 51[target.'cfg(windows)'.dependencies.windows-sys] 52version = "0.45" 53features = [ 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] 62wasi = "0.11.0" 63libc = "0.2.121" 64 65[dev-dependencies] 66env_logger = { version = "0.8.4", default-features = false } 67rand = "0.8" 68 69[package.metadata.docs.rs] 70all-features = true 71rustdoc-args = ["--cfg", "docsrs"] 72targets = [ 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] 87features = ["os-poll", "os-ext", "net"] 88 89[[example]] 90name = "tcp_server" 91required-features = ["os-poll", "net"] 92 93[[example]] 94name = "tcp_listenfd_server" 95required-features = ["os-poll", "net"] 96 97[[example]] 98name = "udp_server" 99required-features = ["os-poll", "net"] 100