All Versions
29
Latest Version
Avg Release Cycle
102 days
Latest Release
959 days ago

Changelog History
Page 1

  • v0.24.1 Changes

    April 22, 2022

    ➕ Added

    🔄 Changed

    🛠 Fixed

    • 🛠 Fixed UnixAddr::size on Linux-based OSes. (#1702)

    ✂ Removed

  • v0.24.0 Changes

    April 21, 2022

    ➕ Added

    • ➕ Added fine-grained features flags. Most Nix functionality can now be conditionally enabled. By default, all features are enabled. (#1611)
    • ➕ Added statfs FS type magic constants for target_os = "android" and synced constants with libc v0.2.121. (#1690)
    • ➕ Added fexecve on DragonFly. (#1577)
    • 🔀 sys::uio::IoVec is now Send and Sync (#1582)
    • ➕ Added EPOLLEXCLUSIVE on Android. (#1567)
    • ➕ Added fdatasync for FreeBSD, Fuchsia, NetBSD, and OpenBSD. (#1581)
    • Added sched_setaffinity and sched_getaffinity on DragonFly. (#1537)
    • ➕ Added posix_fallocate on DragonFly. (#1621)
    • ➕ Added SO_TIMESTAMPING support (#1547)
    • ➕ Added getter methods to MqAttr struct (#1619)
    • ➕ Added the TxTime sockopt and control message. (#1564)
    • ➕ Added POSIX per-process timer support (#1622)
    • ➕ Added sendfile on DragonFly. (#1615)
    • Added UMOUNT_NOFOLLOW, FUSE_SUPER_MAGIC on Linux. (#1634)
    • ➕ Added getresuid, setresuid, getresgid, and setresgid on DragonFly, FreeBSD, and OpenBSD. (#1628)
    • 🛠 Added MAP_FIXED_NOREPLACE on Linux. (#1636)
    • ➕ Added fspacectl on FreeBSD (#1640)
    • ➕ Added accept4 on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. (#1654)
    • ➕ Added AsRawFd implementation on OwningIter. (#1563)
    • Added process_vm_readv and process_vm_writev on Android. (#1557)
    • ➕ Added nix::uncontext module on s390x. (#1662)
    • Implemented Extend, FromIterator, and IntoIterator for SigSet and added SigSet::iter and SigSetIter. (#1553)
    • ➕ Added ENOTRECOVERABLE and EOWNERDEAD error codes on DragonFly. (#1665)
    • Implemented Read and Write for &PtyMaster (#1664)
    • ➕ Added MSG_NOSIGNAL for Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. (#1670)
    • ➕ Added waitid. (#1584)
    • ➕ Added Ipv6DontFrag for android, iOS, linux and macOS.
    • ➕ Added IpDontFrag for iOS, macOS. (#1692)

    🔄 Changed

    • mqueue functions now operate on a distinct type, nix::mqueue::MqdT. Accessors take this type by reference, not by value. (#1639)
    • ✂ Removed SigSet::extend in favor of <SigSet as Extend<Signal>>::extend. Because of this change, you now need use std::iter::Extend to call extend on a SigSet. (#1553)
    • ✂ Removed the the PATH_MAX restriction from APIs accepting paths. Paths will now be allocated on the heap if they are too long. In addition, large instruction count improvements (~30x) were made to path handling. (#1656)
    • 🔄 Changed getrlimit and setrlimit to use rlim_t directly instead of Option<rlim_t>. (#1668)
    • 🗄 Deprecated InetAddr and SockAddr in favor of SockaddrIn, SockaddrIn6, and SockaddrStorage. (#1684)
    • 🗄 Deprecated IpAddr, Ipv4Addr, and Ipv6Addr in favor of their equivalents from the standard library. (#1685)
    • uname now returns a Result<UtsName> instead of just a UtsName and ignoring failures from libc. And getters on the UtsName struct now return an &OsStr instead of &str. (#1672)
    • Replaced IoVec with IoSlice and IoSliceMut, and replaced IoVec::from_slice with IoSlice::new. (#1643)

    🛠 Fixed

    • InetAddr::from_std now sets the sin_len/sin6_len fields on the BSDs. (#1642)
    • 🛠 Fixed a panic in LinkAddr::addr. That function now returns an Option. (#1675) (#1677)

    ✂ Removed

    • ✂ Removed public access to the inner fields of NetlinkAddr, AlgAddr, SysControlAddr, LinkAddr, and VsockAddr. (#1614)
    • ✂ Removed EventFlag::EV_SYSFLAG. (#1635)
  • v0.23.1 Changes

    December 16, 2021

    ➕ Added

    🔄 Changed

    • ⏪ Relaxed the bitflags requirement from 1.3.1 to 1.1. This partially reverts #1492. From now on, the MSRV is not guaranteed to work with all versions of all dependencies, just with some version of all dependencies. (#1607)

    🛠 Fixed

    • 🛠 Fixed soundness issues in FdSet::insert, FdSet::remove, and FdSet::contains involving file descriptors outside of the range 0..FD_SETSIZE. (#1575)
  • v0.23.0 Changes

    September 28, 2021

    ➕ 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)
  • v0.22.0 Changes

    July 09, 2021

    ➕ Added

    • ➕ Added if_nameindex (#1445)
    • ➕ Added nmount for FreeBSD. (#1453)
    • ➕ Added IpFreebind socket option (sockopt) on Linux, Fuchsia and Android. (#1456)
    • ➕ Added TcpUserTimeout socket option (sockopt) on Linux and Fuchsia. (#1457)
    • ➕ Added renameat2 for Linux (#1458)
    • ➕ Added RxqOvfl support on Linux, Fuchsia and Android. (#1455)

    🔄 Changed

    • ptsname_r now returns a lossily-converted string in the event of bad UTF, just like ptsname. (#1446)
    • Nix's error type is now a simple wrapper around the platform's Errno. This means it is now Into<std::io::Error>. It's also Clone, Copy, Eq, and has a small fixed size. It also requires less typing. For example, the old enum variant nix::Error::Sys(nix::errno::Errno::EINVAL) is now simply nix::Error::EINVAL. (#1446)

    🛠 Fixed

    ✂ Removed

  • v0.21.0 Changes

    May 31, 2021

    ➕ Added

    • ➕ Added getresuid and getresgid (#1430)
    • ➕ Added TIMESTAMPNS support for linux (#1402)
    • ➕ Added sendfile64 (#1439)
    • ➕ Added MS_LAZYTIME to MsFlags (#1437)

    🔄 Changed

    • Made forkpty unsafe, like fork (#1390)
    • Made Uid, Gid and Pid methods from_raw and as_raw a const fn (#1429)
    • Made Uid::is_root a const fn (#1429)
    • 📌 AioCb is now always pinned. Once a libc::aiocb gets sent to the kernel, its address in memory must not change. Nix now enforces that by using std::pin. Most users won't need to change anything, except when using aio_suspend. See that method's documentation for the new usage. (#1440)
    • LioCb is now constructed using a distinct LioCbBuilder struct. This avoids a soundness issue with the old LioCb. Usage is similar but construction now uses the builder pattern. See the documentation for details. (#1440)
    • 👍 Minimum supported Rust version is now 1.41.0. (#1440)
    • Errno aliases are now associated consts on Errno, instead of consts in the errno module. (#1452)

    🛠 Fixed

    • 👍 Allow sockaddr_ll size, as reported by the Linux kernel, to be smaller then it's definition (#1395)
    • 🛠 Fix spurious errors using sendmmsg with multiple cmsgs (#1414)
    • ➕ Added Errno::EOPNOTSUPP to FreeBSD, where it was missing. (#1452)

    ✂ Removed

    • ✂ Removed sys::socket::accept4 from Android arm because libc removed it in version 0.2.87. (#1399)
    • AioCb::from_boxed_slice and AioCb::from_boxed_mut_slice have been removed. They were useful with earlier versions of Rust, but should no longer be needed now that async/await are available. AioCbs now work exclusively with borrowed buffers, not owned ones. (#1440)
    • ✂ Removed some Errno values from platforms where they aren't actually defined. (#1452)
  • v0.20.0 Changes

    February 20, 2021

    ➕ Added

    • ➕ Added a passwd field to Group (#1338)
    • ➕ Added mremap (#1306)
    • ➕ Added personality (#1331)
    • ➕ Added limited Fuchsia support (#1285)
    • ➕ Added getpeereid (#1342)
    • Implemented IntoIterator for Dir (#1333).

    🔄 Changed

    • 👍 Minimum supported Rust version is now 1.40.0. (#1356)
    • 🗄 i686-apple-darwin has been demoted to Tier 2 support, because it's deprecated by Xcode. (#1350)
    • 🛠 Fixed calling recvfrom on an AddrFamily::Packet socket (#1344)

    🛠 Fixed

    • TimerFd now closes the underlying fd on drop. (#1381)
    • 🐧 Define *_MAGIC filesystem constants on Linux s390x (#1372)
    • mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 (#1366)

    ✂ Removed

    • 🚦 Dir, SignalFd, and PtyMaster are no longer Clone. (#1382)
    • ✂ Removed SockLevel, which hasn't been used for a few years (#1362)
    • ✂ Removed both Copy and Clone from TimerFd. (#1381)
  • v0.19.1 Changes

    November 28, 2020

    🛠 Fixed

    • 🛠 Fixed bugs in recvmmsg. (#1341)
  • v0.19.0 Changes

    October 06, 2020

    ➕ Added

    • ➕ Added Netlink protocol families to the SockProtocol enum (#1289)
    • Added clock_gettime, clock_settime, clock_getres, clock_getcpuclockid functions and ClockId struct. (#1281)
    • Added wrapper functions for PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP. (#1300)
    • ➕ Add support for Vsock on Android rather than just Linux. (#1301)
    • Added TCP_KEEPCNT and TCP_KEEPINTVL TCP keepalive options. (#1283) ### 🔄 Changed
    • 🔦 Expose SeekData and SeekHole on all Linux targets (#1284)
    • 🔄 Changed unistd::{execv,execve,execvp,execvpe,fexecve,execveat} to take both &[&CStr] and &[CString] as its list argument(s). (#1278)
    • Made unistd::fork an unsafe funtion, bringing it in line with libstd's decision. (#1293) ### 🛠 Fixed ### ✂ Removed
  • v0.18.0 Changes

    July 26, 2020

    ➕ Added

    • ➕ Added fchown(2) wrapper. (#1257)
    • Added support on linux systems for MAP_HUGE_SIZE family of flags. (#1211)
    • Added support for F_OFD_* fcntl commands on Linux and Android. (#1195)
    • ➕ Added env::clearenv(): calls libc::clearenv on platforms where it's available, and clears the environment of all variables via std::env::vars and std::env::remove_var on others. (#1185)
    • FsType inner value made public. (#1187)
    • ➕ Added unistd::setfsuid and unistd::setfsgid to set the user or group identity for filesystem checks per-thread. (#1163)
    • Derived Ord, PartialOrd for unistd::Pid (#1189)
    • ➕ Added select::FdSet::fds method to iterate over file descriptors in a set. (#1207)
    • ➕ Added support for UDP generic segmentation offload (GSO) and generic receive offload (GRO) (#1209)
    • ➕ Added support for sendmmsg and recvmmsg calls (#1208)
    • ➕ Added support for SCM_CREDS messages (UnixCredentials) on FreeBSD/DragonFly (#1216)
    • ➕ Added BindToDevice socket option (sockopt) on Linux (#1233)
    • Added EventFilter bitflags for EV_DISPATCH and EV_RECEIPT on OpenBSD. (#1252)
    • ➕ Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage. (#1222)
    • 0️⃣ CpuSet and UnixCredentials now implement Default. (#1244)
    • ➕ Added unistd::ttyname (#1259)
    • ➕ Added support for Ipv4PacketInfo and Ipv6PacketInfo to ControlMessage for iOS and Android. (#1265)
    • ➕ Added support for TimerFd. (#1261)

    🔄 Changed

    • 🔄 Changed fallocate return type from c_int to () (#1201)
    • 🐧 Enabled sys::ptrace::setregs and sys::ptrace::getregs on x86_64-unknown-linux-musl target (#1198)
    • 🐧 On Linux, ptrace::write is now an unsafe function. Caveat programmer. (#1245)
    • execv, execve, execvp and execveat in ::nix::unistd and reboot in ::nix::sys::reboot now return Result<Infallible> instead of Result<Void> (#1239)
    • sys::socket::sockaddr_storage_to_addr is no longer unsafe. So is offset_of!.
    • sys::socket::sockaddr_storage_to_addr, offset_of!, and Errno::clear are no longer unsafe.
    • SockAddr::as_ffi_pair,sys::socket::sockaddr_storage_to_addr, offset_of!, and Errno::clear are no longer unsafe. (#1244)
    • Several Inotify methods now take self by value instead of by reference (#1244)
    • 📊 nix::poll::ppoll: timeout parameter is now optional, None is equivalent for infinite timeout.

    🛠 Fixed

    • 🛠 Fixed getsockopt. The old code produced UB which triggers a panic with Rust 1.44.0. (#1214)

    • 🛠 Fixed a bug in nix::unistd that would result in an infinite loop when a group or user lookup required a buffer larger than 16KB. (#1198)

    • Fixed unaligned casting of cmsg_data to af_alg_iv (#1206)

    • 🛠 Fixed readlink/readlinkat when reading symlinks longer than PATH_MAX (#1231)

    • PollFd, EpollEvent, IpMembershipRequest, Ipv6MembershipRequest, TimeVal, and IoVec are now repr(transparent). This is required for correctness's sake across all architectures and compilers, though now bugs have been reported so far. (#1243)

    • 🛠 Fixed unaligned pointer read in Inotify::read_events. (#1244)

    ✂ Removed

    • Removed sys::socket::addr::from_libc_sockaddr from the public API. (#1215)
    • Removed sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapper from the public API. These were previously hidden in the docs but still usable by downstream. (#1235)

    • Nix no longer implements NixPath for Option<P> where P: NixPath. Most Nix functions that accept NixPath arguments can't do anything useful with None. The exceptions (mount and quotactl_sync) already take explicitly optional arguments. (#1242)

    • ✂ Removed unistd::daemon and unistd::pipe2 on OSX and ios (#1255)

    • Removed sys::event::FilterFlag::NOTE_EXIT_REPARENTED and sys::event::FilterFlag::NOTE_REAP on OSX and ios. (#1255)

    • ✂ Removed sys::ptrace::ptrace on Android and Linux. (#1255)

    • ⬇️ Dropped support for powerpc64-unknown-linux-gnu (#1266)