summaryrefslogtreecommitdiff
path: root/Cargo.toml
AgeCommit message (Collapse)Author
2022-06-26Document aliases for functions like getuid()Ryan Zoeller
Add the autocfg crate as a build dependency, and introduce has_doc_alias as a conditional compilation symbol.
2022-05-29Use released libc version 0.2.126Alan Somers
2022-05-14Rewrite the aio moduleAlan Somers
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-05-11Merge #1699bors[bot]
1699: Revert "Pin nightly compiler used in CI for uclibc" r=rtzoeller a=asomers This reverts commit 23f18dfc18929965c95e0bcbdb8731645f07e401. libc v0.2.124 fixes the problem. Co-authored-by: Alan Somers <asomers@gmail.com>
2022-04-24Upgrade dev-dependencies to the latest versionsRyan Zoeller
Don't change how the versions are specified (i.e. whether a patch version is listed). parking_lot cannot be upgraded due to 0.12.0 bumping the MSRV to 1.49. In many cases, nix was one of the only consumers of the current versions (i.e. we are late to upgrade).
2022-04-24Upgrade sysctl to 0.4Ryan Zoeller
Upgrade sysctl dev-dependency to 0.4 and handle its breaking API changes.
2022-04-22(cargo-release) version 0.24.1Ryan Zoeller
2022-04-20(cargo-release) version 0.24.0Ryan Zoeller
2022-04-18Revert "Pin nightly compiler used in CI for uclibc"Alan Somers
This reverts commit 23f18dfc18929965c95e0bcbdb8731645f07e401. libc v0.2.124 fixes the problem.
2022-04-09Use singular number for all feature namesAlan Somers
features => feature users => user Neither of these features have yet been included in a release, so it's ok to rename them.
2022-03-20Redox renamed sigaction.sa_handler to .sa_sigactionRyan Zoeller
2022-03-13Fix the build on DragonflyBSD with -Zminimal-versionsAlan Somers
2022-02-07use version of libc published on cratesMichael Baikov
https://github.com/rust-lang/libc/pull/2543 was merged and is available starting from 0.2.114. Using published version of libc makes it easier to use git version of nix
2022-01-23Make memoffset dependency optionalRyan Zoeller
Only the socket feature depends on memoffset. Allow clients to skip pulling memoffset in as a dependency if they don't need it.
2022-01-23Add fspacectl on FreeBSDAlan Somers
2022-01-16Remove EventFlag::EV_SYSFLAGRyan Zoeller
It is not stable across OpenBSD versions and is reserved by the system on FreeBSD and NetBSD.
2021-12-30Remove cc dependency on DragonFlyRyan Zoeller
f5ee22db489f78b9c003ef60b7ad1b837503bc4a removed the need for this dependency.
2021-12-21DragonFly 6.0 added fexecve(2)Ryan Zoeller
2021-12-20feature-gate most Nix functionsVincent Dagonneau
Using features reduces build time and size for consumer crates. By default all features are enabled.
2021-12-16(cargo-release) version 0.23.1Alan Somers
2021-12-16Relax the bitflags dependency from 1.3.1 to 1.1Alan Somers
Fixes #1555
2021-12-15Merge #1561bors[bot]
1561: Declare the MSRV in Cargo.toml r=rtzoeller a=asomers This is a new feature in Cargo 1.56.0, currently in beta. Once Nix's MSRV is >= 1.56.0, this feature will prevent future problems like the bitflags 1.3.0 fiasco. Issue #1491 Issue #1510 Issue #1548 Issue #1555 Co-authored-by: Alan Somers <asomers@gmail.com>
2021-11-27Avoid lock poisoning by using parking_lotRyan Zoeller
parking_lot provides synchronization primitives which aren't poisoned on panic. This makes it easier to determine which tests are failing, as a test failure no longer causes all subsequent tests using that mutex to fail.
2021-11-17Include tests in the crate againZbigniew Jędrzejewski-Szmek
…so it is possible to run checks on the crate again. Fixup for 7a2fe9099fc226cf5010b450f473ca9a0db5bafc.
2021-10-15Declare the MSRV in Cargo.tomlAlan Somers
This is a new feature in Cargo 1.56.0, currently in beta. Once Nix's MSRV is >= 1.56.0, this feature will prevent future problems like the bitflags 1.3.0 fiasco. Issue #1491 Issue #1510 Issue #1548 Issue #1555
2021-09-28(cargo-release) version 0.23.0Alan Somers
2021-09-18Set libc version to 0.2.102Alan Somers
2021-09-04Enable pwritev and preadv for more operating systems.Alan Somers
2021-08-13Fix the build with bitflags-1.3.0 and newerAlan Somers
Bitflags raised its MSRV in a minor version, forcing all consumers to follow suit. Fixes #1491
2021-08-09Remove some actually unsupported termios iflags on redoxNoah
2021-07-13Use immutable receivers for FdSet::{highest, contains, fds}Alan Somers
There was never any good reason to use mutable receives in the first place. Nix originally did so because libc defined FD_ISSET as taking a mutable receiver, which it did based on an inaccurate Linux man page. But that's fixed now. https://github.com/rust-lang/libc/pull/1725
2021-07-11Switch Cargo from an exclude list to an include listAlan Somers
The exclude list had gotten out-of-date.
2021-07-09Release v0.22.0Alan Somers
2021-07-07Bump libc to 0.2.98Anthony Ramine
A new libc release with the MNT_ fixes was released.
2021-06-13Add nmount for FreeBSD.Alan Somers
2021-05-31Release v0.21.0Alan Somers
2021-05-31Merge #1437bors[bot]
1437: Add MS_LAZYTIME flag r=asomers a=ManaSugi MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode timestamps (atime, mtime, ctime) by maintaining these changes only in memory. MS_LAZYTIME is available from `libc` v0.2.95. Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com> Co-authored-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-05-31Add MS_LAZYTIME flagManabu Sugimoto
MS_LAZYTIME (since Linux 4.0) reduces on-disk updates of inode timestamps (atime, mtime, ctime) by maintaining these changes only in memory. Signed-off-by: Manabu Sugimoto <Manabu.Sugimoto@sony.com>
2021-05-30Adapt aio to the world of async/await, and fix some potential unsoundness.Alan Somers
* libc::aiocb must not be moved while the kernel has a pointer to it. This change enforces that requirement by using std::pin. * Split LioCbBuilder out of LioCb. struct LioCb relied on the (incorrect) assumption that a Vec's elements have a stable location in memory. That's not true; they can be moved during Vec::push. The solution is to use a Vec in the new Builder struct, but finalize it to a boxed slice (which doesn't support push) before allowing it to be submitted to the kernel. * Eliminate owned buffer types. mio-aio no longer uses owned buffers with nix::aio. There's little need for it in the world of async/await. I'm not aware of any other consumers. This substantially simplifies the code.
2021-05-27Update to semver 1.0.0David Tolnay
2021-04-08Merge #1402bors[bot]
1402: Support TIMESTAMPNS r=asomers a=WiSaGaN This adds support of linux TIMESTAMPNS. The code is mostly copied paste from https://github.com/nix-rust/nix/pull/663 Co-authored-by: Lu, Wangshan <wisagan@gmail.com>
2021-04-08Support TIMESTAMPNS for linuxLu, Wangshan
2021-04-04Use memoffset::offset_of instead of homegrown macroAlan Somers
The homegrown macro was fine in 2016, but at some point it technically became UB. The memoffset crate does the same thing, but avoids UB when using rustc 1.51.0 or later. Fixes #1415
2021-03-21illumos and Solaris supportJason King
Co-authored-by: Dominik Hassler <hadfl@omnios.org> Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
2021-02-20Update rand to 0.8Alan Somers
This eliminates some duplicate dependencies
2021-02-20Update tempfile dev dependencyAlan Somers
This eliminates the need to build multiple versions of cfg-if
2021-02-20Prepare for release 0.20.0Alan Somers
2021-02-15Bump caps to 0.5.1. Add x32 to CI for cross-builds and Tier 3 list in READMEнаб
2021-02-02Define *_MAGIC filesystem constants on Linux s390xJakob Naucke
Since rust-lang/libc is now using the correct data type on s390x (c_uint) for statfs constants, the s390x exemptions in the statfs MAGIC definitions like EXT4_SUPER_MAGIC can be removed. Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2020-12-19Add fuchsia supportAmanda Tait
Allow nix to compile on Fuchsia by conditionally avoiding libc functionality that does not exist for Fuchsia.