nix v0.23.0 Release Notes

Release Date: 2021-09-28 // over 2 years ago
  • ➕ Added

    • ➕ Added the LocalPeerCred sockopt. (#1482)
    • Added TimeSpec::from_duration and TimeSpec::from_timespec (#1465)
    • ➕ Added IPV6_V6ONLY sockopt. (#1470)
    • ➕ Added impl From<User> for libc::passwd trait implementation to convert a User into a libc::passwd. Consumes the User struct to give ownership over the member pointers. (#1471)
    • ➕ Added pthread_kill. (#1472)
    • ➕ Added mknodat. (#1473)
    • ➕ Added setrlimit and getrlimit. (#1302)
    • ➕ Added ptrace::interrupt method for platforms that support PTRACE_INTERRUPT (#1422)
    • Added IP6T_SO_ORIGINAL_DST sockopt. (#1490)
    • Added the PTRACE_EVENT_STOP variant to the sys::ptrace::Event enum (#1335)
    • Exposed SockAddr::from_raw_sockaddr (#1447)
    • ➕ Added TcpRepair (#1503)
    • Enabled pwritev and preadv for more operating systems. (#1511)
    • ➕ Added support for TCP_MAXSEG TCP Maximum Segment Size socket options (#1292)
    • ➕ Added Ipv4RecvErr and Ipv6RecvErr sockopts and associated control messages. (#1514)
    • ➕ Added AsRawFd implementation on PollFd. (#1516)
    • ➕ Added Ipv4Ttl and Ipv6Ttl sockopts. (#1515)
    • Added MAP_EXCL, MAP_ALIGNED_SUPER, and MAP_CONCEAL mmap flags, and exposed MAP_ANONYMOUS for all operating systems. (#1522) (#1525) (#1531) (#1534)
    • ➕ Added read/write accessors for 'events' on PollFd. (#1517)

    🔄 Changed

    • FdSet::{contains, highest, fds} no longer require a mutable reference. (#1464)
    • 👍 User::gecos and corresponding libc::passwd::pw_gecos are supported on 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#1471)
    • 👍 eventfds are supported on Android, change conditional compilation to include sys::eventfd::eventfd and sys::eventfd::EfdFlagsfor Android builds. (#1481)
    • Most enums that come from C, for example Errno, are now marked as #[non_exhaustive]. (#1474)
    • Many more functions, mostly contructors, are now const. (#1476) (#1492)
    • sys::event::KEvent::filter now returns a Result instead of being infalliable. The only cases where it will now return an error are cases where it previously would've had undefined behavior. (#1484)
    • 👍 Minimum supported Rust version is now 1.46.0. (#1492)
    • 👍 Rework UnixAddr to encapsulate internals better in order to fix soundness issues. No longer allows creating a UnixAddr from a raw sockaddr_un. (#1496)
    • Raised bitflags to 1.3.0 and the MSRV to 1.46.0. (#1492)

    🛠 Fixed

    • posix_fadvise now returns errors in the conventional way, rather than as a non-zero value in Ok(). (#1538)
    • ➕ Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#1467)
    • 🛠 Fixed potential undefined behavior in Signal::try_from on some platforms. (#1484)
    • 🛠 Fixed buffer overflow in unistd::getgrouplist. (#1545)

    ✂ Removed

    • ✂ Removed a couple of termios constants on redox that were never actually supported. (#1483)
    • ✂ Removed nix::sys::signal::NSIG. It was of dubious utility, and not correct for all platforms. (#1484)
    • ✂ Removed support for 32-bit Apple targets, since they've been dropped by both Rustc and Xcode. (#1492)
    • Deprecated SockAddr/InetAddr::to_str in favor of ToString::to_string (#1495)
    • ✂ Removed SigevNotify on OpenBSD and Redox. (#1511)