forked from bytecodealliance/rustix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
161 lines (133 loc) · 5.82 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[package]
name = "rustix"
version = "0.34.2"
authors = [
"Dan Gohman <[email protected]>",
"Jakub Konka <[email protected]>",
]
description = "Safe Rust bindings to POSIX/Unix/Linux/Winsock2-like syscalls"
documentation = "https://docs.rs/rustix"
license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
repository = "https://github.com/bytecodealliance/rustix"
edition = "2018"
keywords = ["api", "file", "network", "safe", "syscall"]
categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"]
exclude = ["/.*", "test-crates"]
[build-dependencies]
cc = { version = "1.0.68", optional = true }
[dependencies]
bitflags = "1.2.1"
itoa = { version = "1.0.1", default-features = false, optional = true }
io-lifetimes = { version = "0.6.0", default-features = false, optional = true }
# Special dependencies used in rustc-dep-of-std mode.
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" }
compiler_builtins = { version = '0.1.49', optional = true }
# The procfs feature needs once_cell.
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
once_cell = { version = "1.5.2", optional = true }
# On Linux on selected architectures, we have two supported backends: linux_raw
# and libc. The libc and errno dependencies are only enabled when the libc
# backend is in use.
[target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), all(target_arch = "powerpc64", target_endian = "little"), target_arch = "riscv64", all(target_arch = "mips", target_endian = "little"), all(target_arch = "mips64", target_endian = "little"))))'.dependencies]
linux-raw-sys = { version = "0.0.46", default-features = false, features = ["general", "errno", "ioctl", "no_std"] }
errno = { version = "0.2.8", default-features = false, optional = true }
libc = { version = "0.2.118", features = ["extra_traits"], optional = true }
# On all other Unix-family platforms, and under Miri, we always use the libc
# backend, so enable its dependencies unconditionally.
[target.'cfg(any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), all(target_arch = "powerpc64", target_endian = "little"), target_arch = "riscv64", all(target_arch = "mips", target_endian = "little"), all(target_arch = "mips64", target_endian = "little"))))))'.dependencies]
errno = { version = "0.2.8", default-features = false }
libc = { version = "0.2.118", features = ["extra_traits"] }
[target.'cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"), target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), all(target_arch = "powerpc64", target_endian = "little"), target_arch = "riscv64", all(target_arch = "mips", target_endian = "little"), all(target_arch = "mips64", target_endian = "little")))))))'.dependencies]
# Some syscalls do not have libc wrappers, such as in `io_uring`. For these,
# we use the linux-raw-sys ABI and `libc::syscall`.
linux-raw-sys = { version = "0.0.46", default-features = false, optional = true, features = ["general", "no_std"] }
# For the libc backend on Windows, use the Winsock2 API in windows-sys.
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.36.0"
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
"Win32_NetworkManagement_IpHelper",
"Win32_System_Threading"
]
[dev-dependencies]
tempfile = "3.2.0"
libc = "0.2.118"
errno = "0.2.8"
serial_test = "0.6"
memoffset = "0.6.5"
[target.'cfg(not(target_os = "emscripten"))'.dev-dependencies]
criterion = "0.3"
[target.'cfg(windows)'.dev-dependencies]
ctor = "0.1.21"
# Add Criterion configuration, as described here:
# <https://bheisler.github.io/criterion.rs/book/getting_started.html#step-1---add-dependency-to-cargotoml>
[[bench]]
name = "mod"
harness = false
[package.metadata.docs.rs]
features = ["all-apis"]
rustdoc-args = ["--cfg", "doc_cfg"]
targets = [
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
]
[features]
default = ["std"]
std = ["io-lifetimes"]
rustc-dep-of-std = [
"core",
"alloc",
"compiler_builtins",
"linux-raw-sys/rustc-dep-of-std",
"bitflags/rustc-dep-of-std",
]
# Enable this to request the libc backend.
use-libc = ["errno", "libc"]
# Enable `rustix::fs::*`.
fs = []
# Enable `rustix::io_uring::*` (on platforms that support it).
io_uring = ["linux-raw-sys", "fs", "net"]
# Enable `rustix::net::*`.
net = []
# Enable `rustix::thread::*`.
thread = []
# Enable `rustix::process::*`.
process = []
# Enable `rustix::time::*`.
time = []
# Enable this to enable `rustix::io::proc_self_*` (on Linux) and `ttyname`.
procfs = ["once_cell", "itoa"]
# Enable `rustix::termios::*`.
termios = []
# Enable `rustix::mm::*`.
mm = []
# Enable `rustix::rand::*`.
rand = []
# Enable `rustix::runtime::*`. This API is undocumented and unstable.
runtime = []
# Enable all API features.
all-apis = [
"fs",
"io_uring",
"mm",
"net",
"process",
"procfs",
"rand",
"runtime",
"termios",
"thread",
"time",
]
# Expose io-lifetimes' features for third-party crate impls.
async-std = ["io-lifetimes/async-std"]
tokio = ["io-lifetimes/tokio"]
os_pipe = ["io-lifetimes/os_pipe"]
socket2 = ["io-lifetimes/socket2"]
mio = ["io-lifetimes/mio"]
fs-err = ["io-lifetimes/fs-err"]
all-impls = ["async-std", "tokio", "os_pipe", "socket2", "mio", "fs-err"]