Debian Codegraph @

.cargo/vendor/rustix/Cargo.toml.orig

raw
1 [package]
2 name = "rustix"
3 version = "0.38.34"
4 authors = [
5 "Dan Gohman <[email protected]>",
6 "Jakub Konka <[email protected]>",
7 ]
8 description = "Safe Rust bindings to POSIX/Unix/Linux/Winsock-like syscalls"
9 documentation = "https://docs.rs/rustix"
10 license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
11 repository = "https://github.com/bytecodealliance/rustix"
12 edition = "2021"
13 keywords = ["api", "file", "network", "safe", "syscall"]
14 categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"]
15 include = ["src", "build.rs", "Cargo.toml", "COPYRIGHT", "LICENSE*", "/*.md", "benches"]
16 rust-version = "1.63"
17
18 [dependencies]
19 bitflags = { version = "2.4.0", default-features = false }
20 itoa = { version = "1.0.1", default-features = false, optional = true }
21
22 # Special dependencies used in rustc-dep-of-std mode.
23 core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
24 alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" }
25 compiler_builtins = { version = '0.1.49', optional = true }
26
27 # The procfs feature needs once_cell.
28 # With Rust 1.70.0, we can switch to `core::cell::OnceCell`.
29 [target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
30 once_cell = { version = "1.5.2", optional = true }
31
32 # Dependencies for platforms where linux_raw is supported, in addition to libc:
33 #
34 # On Linux on selected architectures, the linux_raw backend is supported, in
35 # addition to the libc backend. The linux_raw backend is used by default. The
36 # libc backend can be selected via adding `--cfg=rustix_use_libc` to
37 # `RUSTFLAGS` or enabling the `use-libc` cargo feature.
38 [target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))'.dependencies]
39 linux-raw-sys = { version = "0.4.12", default-features = false, features = ["general", "errno", "ioctl", "no_std", "elf"] }
40 libc_errno = { package = "errno", version = "0.3.8", default-features = false, optional = true }
41 libc = { version = "0.2.153", default-features = false, optional = true }
42
43 # Dependencies for platforms where only libc is supported:
44 #
45 # On all other Unix-family platforms, and under Miri, we always use the libc
46 # backend, so enable its dependencies unconditionally.
47 [target.'cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))))))'.dependencies]
48 libc_errno = { package = "errno", version = "0.3.8", default-features = false }
49 libc = { version = "0.2.153", default-features = false }
50
51 # Additional dependencies for Linux with the libc backend:
52 #
53 # Some syscalls do not have libc wrappers, such as in `io_uring`. For these,
54 # the libc backend uses the linux-raw-sys ABI and `libc::syscall`.
55 [target.'cfg(all(any(target_os = "android", target_os = "linux"), any(rustix_use_libc, miri, not(all(target_os = "linux", target_endian = "little", any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))))))'.dependencies]
56 linux-raw-sys = { version = "0.4.12", default-features = false, features = ["general", "ioctl", "no_std"] }
57
58 # For the libc backend on Windows, use the Winsock API in windows-sys.
59 [target.'cfg(windows)'.dependencies.windows-sys]
60 version = "0.52.0"
61 features = [
62 "Win32_Foundation",
63 "Win32_Networking_WinSock",
64 "Win32_NetworkManagement_IpHelper",
65 "Win32_System_Threading"
66 ]
67
68 # For the libc backend on Windows, also use the errno crate, which has Windows
69 # support.
70 [target.'cfg(windows)'.dependencies.libc_errno]
71 version = "0.3.8"
72 package = "errno"
73 default-features = false
74
75 [dev-dependencies]
76 tempfile = "3.5.0"
77 libc = "0.2.153"
78 libc_errno = { package = "errno", version = "0.3.8", default-features = false }
79 serial_test = "2.0.0"
80 memoffset = "0.9.0"
81 flate2 = "1.0"
82 static_assertions = "1.1.0"
83
84 [target.'cfg(all(criterion, not(any(target_os = "emscripten", target_os = "wasi"))))'.dev-dependencies]
85 criterion = "0.4"
86
87 [target.'cfg(windows)'.dev-dependencies]
88 ctor = "0.2.0"
89
90 # Add Criterion configuration, as described here:
91 # <https://bheisler.github.io/criterion.rs/book/getting_started.html#step-1---add-dependency-to-cargotoml>
92 [[bench]]
93 name = "mod"
94 harness = false
95
96 [package.metadata.docs.rs]
97 features = ["all-apis"]
98 rustdoc-args = ["--cfg", "doc_cfg"]
99 targets = [
100 "x86_64-unknown-linux-gnu",
101 "i686-unknown-linux-gnu",
102 "x86_64-apple-darwin",
103 "x86_64-pc-windows-msvc",
104 "x86_64-unknown-freebsd",
105 "x86_64-unknown-openbsd",
106 "x86_64-unknown-netbsd",
107 "x86_64-unknown-dragonfly",
108 "x86_64-unknown-illumos",
109 "x86_64-unknown-redox",
110 "x86_64-unknown-haiku",
111 "wasm32-unknown-emscripten",
112 "wasm32-wasi",
113 ]
114
115 [features]
116
117 # By default, use `std` and use libc for aux values.
118 #
119 # It turns out to be bizarrely awkward to obtain the aux values reliably and
120 # efficiently on Linux from anywhere other than libc. We can do it, but most
121 # users are better served by just using libc for this.
122 default = ["std", "use-libc-auxv"]
123
124 # This enables use of std. Disabling this enables `#![no_std]`, and requires
125 # Rust 1.64 or newer.
126 std = ["bitflags/std", "alloc", "libc?/std", "libc_errno?/std", "libc-extra-traits"]
127
128 # Enable this to request the libc backend.
129 use-libc = ["libc_errno", "libc", "libc-extra-traits"]
130
131 # Enable `extra_traits` in libc types, to provide `Debug`, `Hash`, and other
132 # trait impls for libc types.
133 libc-extra-traits = ["libc?/extra_traits"]
134
135 # Enable `rustix::event::*`.
136 event = []
137
138 # Enable `rustix::fs::*`.
139 fs = []
140
141 # Enable `rustix::io_uring::*` (on platforms that support it).
142 io_uring = ["event", "fs", "net", "linux-raw-sys/io_uring"]
143
144 # Enable `rustix::mount::*`.
145 mount = []
146
147 # Enable `rustix::net::*`.
148 net = ["linux-raw-sys/net", "linux-raw-sys/netlink", "linux-raw-sys/if_ether", "linux-raw-sys/xdp"]
149
150 # Enable `rustix::thread::*`.
151 thread = ["linux-raw-sys/prctl"]
152
153 # Enable `rustix::process::*`.
154 process = ["linux-raw-sys/prctl"]
155
156 # Enable `rustix::shm::*`.
157 shm = ["fs"]
158
159 # Enable `rustix::time::*`.
160 time = []
161
162 # Enable `rustix::param::*`.
163 param = ["fs"]
164
165 # Enable this to enable `rustix::io::proc_self_*` (on Linux) and `ttyname`.
166 procfs = ["once_cell", "itoa", "fs"]
167
168 # Enable `rustix::pty::*`.
169 pty = ["itoa", "fs"]
170
171 # Enable `rustix::termios::*`.
172 termios = []
173
174 # Enable `rustix::mm::*`.
175 mm = []
176
177 # Enable `rustix::pipe::*`.
178 pipe = []
179
180 # Enable `rustix::rand::*`.
181 rand = []
182
183 # Enable `rustix::stdio::*`.
184 stdio = []
185
186 # Enable `rustix::system::*`.
187 system = ["linux-raw-sys/system"]
188
189 # Enable `rustix::runtime::*`. This API is undocumented and unstable and
190 # experimental and not intended for general-purpose use.
191 runtime = ["linux-raw-sys/prctl"]
192
193 # Enable all API features.
194 all-apis = [
195 "event",
196 "fs",
197 "io_uring",
198 "mm",
199 "mount",
200 "net",
201 "param",
202 "pipe",
203 "process",
204 "procfs",
205 "pty",
206 "rand",
207 "runtime",
208 "shm",
209 "stdio",
210 "system",
211 "termios",
212 "thread",
213 "time",
214 ]
215
216 # When using the linux_raw backend, should we use libc for reading the aux
217 # vectors, instead of reading them ourselves from /proc/self/auxv?
218 use-libc-auxv = []
219
220 # Enable "use-explicitly-provided-auxv" mode, with a public
221 # `rustix::param::init` function that must be called before anything else in
222 # rustix. This is unstable and experimental and not intended for
223 # general-purpose use.
224 use-explicitly-provided-auxv = []
225
226 # OS compatibility features
227
228 # Optimize for Linux 4.11 or later
229 linux_4_11 = []
230
231 # Enable all optimizations for the latest Linux versions.
232 linux_latest = ["linux_4_11"]
233
234 # Enable features which depend on the Rust global allocator, such as functions
235 # that return owned strings or `Vec`s.
236 alloc = []
237
238 # This is used in the port of std to rustix. This is experimental and not meant
239 # for regular use.
240 rustc-dep-of-std = [
241 "dep:core",
242 "dep:alloc",
243 "dep:compiler_builtins",
244 "linux-raw-sys/rustc-dep-of-std",
245 "bitflags/rustc-dep-of-std",
246 "compiler_builtins?/rustc-dep-of-std",
247 ]
248
249 # Obsolete and deprecated.
250 cc = []