1[package] 2name = "io-lifetimes" 3version = "1.0.5" 4description = "A low-level I/O ownership and borrowing library" 5authors = ["Dan Gohman <dev@sunfishcode.online>"] 6license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" 7keywords = ["api", "io"] 8categories = ["os", "rust-patterns"] 9edition = "2018" 10repository = "https://github.com/sunfishcode/io-lifetimes" 11include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md"] 12 13[dependencies] 14# io-lifetimes only depends on libc/windows-sys for the ability to close 15# and duplicate fds/handles/sockets. The following are just optional 16# dependencies to add foreign-type impls for the traits. In the future, 17# we'll prefer to have crates provide their own impls; this is just a 18# temporary measure. 19 20# Optionally depend on fs_err to implement traits for its types for now. 21fs-err = { version = "2.6.0", optional = true } 22 23[target.'cfg(not(target_os = "wasi"))'.dependencies] 24# Optionally depend on os_pipe to implement traits for its types for now. 25os_pipe = { version = "1.0.0", features = ["io_safety"], optional = true } 26 27# The following dependencies allow io-lifetimes to define impls for various 28# third-party traits. This is only done in not(io_safety_is_in_std) mode, 29# because when we're using the std types and traits, we can't define impls 30# on third-party traits, due to the orphan rule. Work is ongoing to add 31# the needs impls upstream. 32# 33# These dependencies are currently disabled on WASI, because we need to 34# enable some features which don't work on WASI yet. So for now, WASI users 35# will need to wait until the impls are added upstream. 36 37# Optionally depend on async-std just to provide impls for its types. 38async-std = { version = "1.12.0", optional = true } 39# Optionally depend on tokio to implement traits for its types. 40tokio = { version = "1.6.0", features = ["io-std", "fs", "net", "process"], optional = true } 41# Optionally depend on socket2 to implement traits for its types. 42socket2 = { version = "0.4.0", optional = true } 43# Optionally depend on mio to implement traits for its types. 44mio = { version = "0.8.0", features = ["net", "os-ext"], optional = true } 45 46[target.'cfg(not(windows))'.dependencies] 47libc = { version = "0.2.96", optional = true } 48 49[target.'cfg(windows)'.dependencies.windows-sys] 50version = "0.45.0" 51optional = true 52features = [ 53 "Win32_Foundation", 54 "Win32_Storage_FileSystem", 55 "Win32_Networking_WinSock", 56 "Win32_Security", 57 "Win32_System_IO", 58 "Win32_System_Threading", 59] 60 61[features] 62default = ["close"] 63close = ["libc", "windows-sys"] 64