third_party_rust_nix/Cargo.toml

117 lines
2.4 KiB
TOML
Raw Normal View History

2014-08-07 20:02:28 +00:00
[package]
2015-01-05 08:30:07 +00:00
name = "nix"
2015-02-21 00:43:26 +00:00
description = "Rust friendly bindings to *nix APIs"
2020-05-31 21:17:16 +00:00
edition = "2018"
2022-04-22 23:46:23 +00:00
version = "0.24.1"
rust-version = "1.46"
authors = ["The nix-rust Project Developers"]
2016-04-07 14:29:16 +00:00
repository = "https://github.com/nix-rust/nix"
2015-01-05 08:30:07 +00:00
license = "MIT"
2017-01-20 16:56:42 +00:00
categories = ["os::unix-apis"]
include = ["src/**/*", "test/**/*", "LICENSE", "README.md", "CHANGELOG.md"]
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-linux-android",
"x86_64-apple-darwin",
"aarch64-apple-ios",
"x86_64-unknown-freebsd",
"x86_64-unknown-openbsd",
"x86_64-unknown-netbsd",
"x86_64-unknown-dragonfly",
"x86_64-fuchsia",
"x86_64-unknown-redox",
"x86_64-unknown-illumos"
]
[dependencies]
2022-05-29 19:10:50 +00:00
libc = { version = "0.2.126", features = [ "extra_traits" ] }
bitflags = "1.1"
2020-10-12 18:17:26 +00:00
cfg-if = "1.0"
Rewrite the aio module The existing AIO implementation has some problems: 1) The in_progress field is checked at runtime, not compile time. 2) The mutable field is checked at runtime, not compile time. 3) A downstream lio_listio user must store extra state to track whether the whole operation is partially, completely, or not at all submitted. 4) Nix does heap allocation itself, rather than allowing the caller to choose it. This can result in double (or triple, or quadruple) boxing. 5) There's no easy way to use lio_listio to submit multiple operations with a single syscall, but poll each individually. 6) The lio_listio usage is far from transparent and zero-cost. 7) No aio_readv or aio_writev support. 8) priority has type c_int; should be i32 9) aio_return should return a usize instead of an isize, since it only uses negative values to indicate errors, which Rust represents via the Result type. This rewrite solves several problems: 1) Unsolved. I don't think it can be solved without something like C++'s guaranteed type elision. It might require changing the signature of Future::poll too. 2) Solved. 3) Solved, by the new in_progress method and by removing the complicated lio_listio resubmit code. 4) Solved. 5) Solved. 6) Solved, by removing the lio_listo resubmit code. It can be reimplemented downstream if necessary. Or even in Nix, but it doesn't fit Nix's theme of zero-cost abstractions. 7) Solved. 8) Solved. 9) Solved. The rewrite includes functions that don't work on FreeBSD, so add CI testing for FreeBSD 14 too. By default only enable tests that will pass on FreeBSD 12.3. But run a CI job on FreeBSD 14 and set a flag that will enable such tests.
2022-04-30 20:10:28 +00:00
pin-utils = { version = "0.1.0", optional = true }
2015-02-11 06:19:04 +00:00
[target.'cfg(not(target_os = "redox"))'.dependencies]
memoffset = { version = "0.6.3", optional = true }
[build-dependencies]
autocfg = "1.1.0"
[features]
default = [
"acct", "aio", "dir", "env", "event", "feature", "fs",
"hostname", "inotify", "ioctl", "kmod", "mman", "mount", "mqueue",
"net", "personality", "poll", "process", "pthread", "ptrace", "quota",
"reboot", "resource", "sched", "signal", "socket", "term", "time",
"ucontext", "uio", "user", "zerocopy",
]
acct = []
Rewrite the aio module The existing AIO implementation has some problems: 1) The in_progress field is checked at runtime, not compile time. 2) The mutable field is checked at runtime, not compile time. 3) A downstream lio_listio user must store extra state to track whether the whole operation is partially, completely, or not at all submitted. 4) Nix does heap allocation itself, rather than allowing the caller to choose it. This can result in double (or triple, or quadruple) boxing. 5) There's no easy way to use lio_listio to submit multiple operations with a single syscall, but poll each individually. 6) The lio_listio usage is far from transparent and zero-cost. 7) No aio_readv or aio_writev support. 8) priority has type c_int; should be i32 9) aio_return should return a usize instead of an isize, since it only uses negative values to indicate errors, which Rust represents via the Result type. This rewrite solves several problems: 1) Unsolved. I don't think it can be solved without something like C++'s guaranteed type elision. It might require changing the signature of Future::poll too. 2) Solved. 3) Solved, by the new in_progress method and by removing the complicated lio_listio resubmit code. 4) Solved. 5) Solved. 6) Solved, by removing the lio_listo resubmit code. It can be reimplemented downstream if necessary. Or even in Nix, but it doesn't fit Nix's theme of zero-cost abstractions. 7) Solved. 8) Solved. 9) Solved. The rewrite includes functions that don't work on FreeBSD, so add CI testing for FreeBSD 14 too. By default only enable tests that will pass on FreeBSD 12.3. But run a CI job on FreeBSD 14 and set a flag that will enable such tests.
2022-04-30 20:10:28 +00:00
aio = ["pin-utils"]
dir = ["fs"]
env = []
event = []
feature = []
fs = []
hostname = []
inotify = []
ioctl = []
kmod = []
mman = []
mount = ["uio"]
mqueue = ["fs"]
net = ["socket"]
personality = []
poll = []
pthread = []
ptrace = ["process"]
quota = []
process = []
reboot = []
resource = []
sched = ["process"]
signal = ["process"]
socket = ["memoffset"]
term = []
time = []
ucontext = ["signal"]
uio = []
user = ["feature"]
zerocopy = ["fs", "uio"]
2015-02-11 06:19:04 +00:00
[dev-dependencies]
assert-impl = "0.1"
lazy_static = "1.4"
parking_lot = "0.11.2"
rand = "0.8"
tempfile = "3.3.0"
semver = "1.0.7"
2015-02-21 22:33:27 +00:00
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dev-dependencies]
caps = "0.5.3"
[target.'cfg(target_os = "freebsd")'.dev-dependencies]
sysctl = "0.4"
2015-02-21 22:33:27 +00:00
[[test]]
name = "test"
path = "test/test.rs"
2015-09-03 19:20:53 +00:00
[[test]]
name = "test-aio-drop"
path = "test/sys/test_aio_drop.rs"
2020-02-11 02:37:33 +00:00
[[test]]
name = "test-clearenv"
path = "test/test_clearenv.rs"
[[test]]
name = "test-mount"
path = "test/test_mount.rs"
harness = false
[[test]]
name = "test-ptymaster-drop"
path = "test/test_ptymaster_drop.rs"