Debian Codegraph @

debian/missing-sources/rustix/Cargo.toml.orig

raw
1 [package]
2 name = "rustix"
3 version = "1.1.3"
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 [hints]
19 # Most users use a fraction of the rustix API surface area, so this reduces compilation times
20 mostly-unused = true
21
22 [dependencies]
23 bitflags = { version = "2.4.0", default-features = false }
24
25 # Special dependencies used in rustc-dep-of-std mode.
26 core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
27 rustc-std-workspace-alloc = { version = "1.0.0", optional = true } # not aliased here but in lib.rs because of name collision with the alloc feature
28
29 # Dependencies for platforms where linux_raw is supported, in addition to libc:
30 #
31 # On Linux on selected architectures, the linux_raw backend is supported, in
32 # addition to the libc backend. The linux_raw backend is used by default. The
33 # libc backend can be selected via adding `--cfg=rustix_use_libc` to
34 # `RUSTFLAGS` or enabling the `use-libc` cargo feature.
35 [target.'cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), 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]
36 linux-raw-sys = { version = "0.11.0", default-features = false, features = ["auxvec", "general", "errno", "ioctl", "no_std", "elf"] }
37 libc_errno = { package = "errno", version = "0.3.10", default-features = false, optional = true }
38 libc = { version = "0.2.177", default-features = false, optional = true }
39
40 # Dependencies for platforms where only libc is supported:
41 #
42 # On all other Unix-family platforms, and under Miri, we always use the libc
43 # backend, so enable its dependencies unconditionally.
44 [target.'cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), 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]
45 libc_errno = { package = "errno", version = "0.3.10", default-features = false }
46 libc = { version = "0.2.177", default-features = false }
47
48 # Additional dependencies for Linux and Android with the libc backend:
49 #
50 # Some syscalls do not have libc wrappers, such as in `io_uring`. For these,
51 # the libc backend uses the linux-raw-sys ABI and `libc::syscall`.
52 [target.'cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), 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]
53 linux-raw-sys = { version = "0.11.0", default-features = false, features = ["general", "ioctl", "no_std"] }
54
55 # For the libc backend on Windows, use the Winsock API in windows-sys.
56 [target.'cfg(windows)'.dependencies.windows-sys]
57 version = ">=0.52, <0.62"
58 features = [
59 "Win32_Foundation",
60 "Win32_Networking_WinSock",
61 ]
62
63 # For the libc backend on Windows, also use the errno crate, which has Windows
64 # support.
65 [target.'cfg(windows)'.dependencies.libc_errno]
66 version = "0.3.10"
67 package = "errno"
68 default-features = false
69
70 [dev-dependencies]
71 tempfile = "3.5.0"
72 libc = "0.2.171"
73 libc_errno = { package = "errno", version = "0.3.10", default-features = false }
74 serial_test = "2.0.0"
75 memoffset = "0.9.0"
76 flate2 = "1.0"
77 static_assertions = "1.1.0"
78
79 # With Rust 1.70 this can be removed in favor of `std::sync::OnceLock`.
80 [target.'cfg(windows)'.dev-dependencies]
81 once_cell = "1.20.3"
82
83 [target.'cfg(all(criterion, not(any(target_os = "emscripten", target_os = "wasi"))))'.dev-dependencies]
84 criterion = "0.4"
85
86 # Add Criterion configuration, as described here:
87 # <https://bheisler.github.io/criterion.rs/book/getting_started.html#step-1---add-dependency-to-cargotoml>
88 [[bench]]
89 name = "mod"
90 harness = false
91
92 [package.metadata.docs.rs]
93 features = ["all-apis"]
94 targets = [
95 "x86_64-unknown-linux-gnu",
96 "i686-unknown-linux-gnu",
97 "x86_64-apple-darwin",
98 "x86_64-pc-windows-msvc",
99 "x86_64-unknown-freebsd",
100 "x86_64-unknown-openbsd",
101 "x86_64-unknown-netbsd",
102 "x86_64-unknown-dragonfly",
103 "x86_64-unknown-illumos",
104 "x86_64-unknown-redox",
105 "x86_64-unknown-haiku",
106 "wasm32-unknown-emscripten",
107 "wasm32-wasip1",
108 ]
109
110 [features]
111
112 # By default, use `std`.
113 default = ["std"]
114
115 # This enables use of std. Disabling this enables `#![no_std]`, and requires
116 # Rust 1.77 or newer.
117 std = ["bitflags/std", "alloc", "libc?/std", "libc_errno?/std"]
118
119 # Enable this to request the libc backend.
120 use-libc = ["libc_errno", "libc"]
121
122 # Enable `rustix::event::*`.
123 event = []
124
125 # Enable `rustix::fs::*`.
126 fs = []
127
128 # Enable `rustix::io_uring::*` (on platforms that support it).
129 io_uring = ["event", "fs", "net", "thread", "linux-raw-sys/io_uring"]
130
131 # Enable `rustix::mount::*`.
132 mount = []
133
134 # Enable `rustix::net::*`.
135 net = ["linux-raw-sys/net", "linux-raw-sys/netlink", "linux-raw-sys/if_ether", "linux-raw-sys/xdp"]
136
137 # Enable `rustix::thread::*`.
138 thread = ["linux-raw-sys/prctl"]
139
140 # Enable `rustix::process::*`.
141 process = ["linux-raw-sys/prctl"]
142
143 # Enable `rustix::shm::*`.
144 shm = ["fs"]
145
146 # Enable `rustix::time::*`.
147 time = []
148
149 # Enable `rustix::param::*`.
150 param = []
151
152 # Enable `rustix::pty::*`.
153 pty = ["fs"]
154
155 # Enable `rustix::termios::*`.
156 termios = []
157
158 # Enable `rustix::mm::*`.
159 mm = []
160
161 # Enable `rustix::pipe::*`.
162 pipe = []
163
164 # Enable `rustix::rand::*`.
165 rand = []
166
167 # Enable `rustix::stdio::*`.
168 stdio = []
169
170 # Enable `rustix::system::*`.
171 system = ["linux-raw-sys/system"]
172
173 # Enable `rustix::runtime::*`. ⚠ This API is undocumented and unstable and
174 # experimental and not intended for general-purpose use. ⚠
175 runtime = ["linux-raw-sys/prctl"]
176
177 # Enable all API features.
178 #
179 # This is primarily intended for rustix developers. Users are encouraged to
180 # enable only those features they need.
181 all-apis = [
182 "event",
183 "fs",
184 "io_uring",
185 "mm",
186 "mount",
187 "net",
188 "param",
189 "pipe",
190 "process",
191 "pty",
192 "rand",
193 "runtime",
194 "shm",
195 "stdio",
196 "system",
197 "termios",
198 "thread",
199 "time",
200 ]
201
202 # When using the linux_raw backend, should we use `getauxval` for reading aux
203 # vectors, instead of `PR_GET_AUXV` or "/proc/self/auxv"?
204 use-libc-auxv = []
205
206 # Enable "use-explicitly-provided-auxv" mode, with a public
207 # `rustix::param::init` function that must be called before anything else in
208 # rustix. This is unstable and experimental and not intended for
209 # general-purpose use.
210 use-explicitly-provided-auxv = []
211
212 # OS compatibility features
213
214 # Specialize for Linux 4.11 or later
215 linux_4_11 = []
216
217 # Specialize for Linux 5.1 or later
218 linux_5_1 = ["linux_4_11"]
219
220 # Specialize for Linux 5.11 or later
221 linux_5_11 = ["linux_5_1"]
222
223 # Enable all specializations for the latest Linux versions.
224 linux_latest = ["linux_5_11"]
225
226 # Enable features which depend on the Rust global allocator, such as functions
227 # that return owned strings or `Vec`s.
228 alloc = []
229
230 # This is used in the port of std to rustix. This is experimental and not meant
231 # for regular use.
232 rustc-dep-of-std = [
233 "core",
234 "rustc-std-workspace-alloc",
235 "linux-raw-sys/rustc-dep-of-std",
236 "bitflags/rustc-dep-of-std",
237 ]
238
239 # Enable `rustix::io::try_close`. The rustix developers do not intend the
240 # existence of this feature to imply that anyone should use it.
241 try_close = []
242
243 [lints.rust.unexpected_cfgs]
244 level = "warn"
245 check-cfg = [
246 'cfg(alloc_c_string)',
247 'cfg(alloc_ffi)',
248 'cfg(apple)',
249 'cfg(asm_experimental_arch)',
250 'cfg(bsd)',
251 'cfg(core_c_str)',
252 'cfg(core_ffi_c)',
253 'cfg(core_intrinsics)',
254 'cfg(criterion)',
255 'cfg(document_experimental_runtime_api)',
256 'cfg(error_in_core)',
257 'cfg(fix_y2038)',
258 'cfg(freebsdlike)',
259 'cfg(libc)',
260 'cfg(linux_kernel)',
261 'cfg(linux_like)',
262 'cfg(linux_raw)',
263 'cfg(linux_raw_dep)',
264 'cfg(lower_upper_exp_for_non_zero)',
265 'cfg(sanitize_memory)',
266 'cfg(netbsdlike)',
267 'cfg(rustc_attrs)',
268 'cfg(rustc_diagnostics)',
269 'cfg(solarish)',
270 'cfg(staged_api)',
271 'cfg(static_assertions)',
272 'cfg(thumb_mode)',
273 'cfg(wasi)',
274 'cfg(wasi_ext)',
275 'cfg(wasip2)',
276 'cfg(target_arch, values("xtensa"))',
277 'cfg(target_os, values("cygwin"))',
278 ]