| 1 | [package] |
| 2 | name = "io-lifetimes" |
| 3 | version = "1.0.11" |
| 4 | description = "A low-level I/O ownership and borrowing library" |
| 5 | authors = ["Dan Gohman <dev@sunfishcode.online>" ] |
| 6 | license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" |
| 7 | keywords = ["api" , "io" ] |
| 8 | categories = ["os" , "rust-patterns" ] |
| 9 | edition = "2018" |
| 10 | repository = "https://github.com/sunfishcode/io-lifetimes" |
| 11 | include = ["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. |
| 21 | fs-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. |
| 25 | os_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. |
| 38 | async-std = { version = "1.12.0" , optional = true } |
| 39 | # Optionally depend on tokio to implement traits for its types. |
| 40 | tokio = { version = "1.6.0" , features = ["io-std" , "fs" , "net" , "process" ], optional = true } |
| 41 | # Optionally depend on socket2 to implement traits for its types. This uses |
| 42 | # 0.4 because 0.5 has an MSRV of 1.63, which is the version where io-lifetimes |
| 43 | # switches to using the types and traits from std ("io_safety_is_in_std"), |
| 44 | # and disables the third-party impls. |
| 45 | socket2 = { version = "0.4.0" , optional = true } |
| 46 | # Optionally depend on mio to implement traits for its types. |
| 47 | mio = { version = "0.8.0" , features = ["net" , "os-ext" ], optional = true } |
| 48 | |
| 49 | [target.'cfg(target_os = "hermit")'.dependencies] |
| 50 | hermit-abi = { version = "0.3" , optional = true } |
| 51 | |
| 52 | [target.'cfg(not(windows))'.dependencies] |
| 53 | libc = { version = "0.2.96" , optional = true } |
| 54 | |
| 55 | [target.'cfg(windows)'.dependencies.windows-sys] |
| 56 | version = "0.48.0" |
| 57 | optional = true |
| 58 | features = [ |
| 59 | "Win32_Foundation" , |
| 60 | "Win32_Storage_FileSystem" , |
| 61 | "Win32_Networking_WinSock" , |
| 62 | "Win32_Security" , |
| 63 | "Win32_System_IO" , |
| 64 | "Win32_System_Threading" , |
| 65 | ] |
| 66 | |
| 67 | [features] |
| 68 | default = ["close" ] |
| 69 | close = ["libc" , "hermit-abi" , "windows-sys" ] |
| 70 | |