All Versions
20
Latest Version
Avg Release Cycle
124 days
Latest Release
66 days ago

Changelog History
Page 1

  • v0.18.0

    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)

  • v0.17.0

    February 04, 2020

    ➕ Added

    • ➕ Add CLK_TCK to SysconfVar (#1177) ### 🔄 Changed ### 🛠 Fixed ### ✂ Removed
    • ✂ Removed deprecated Error::description from error types (#1175)
  • v0.16.1

    December 23, 2019

    ➕ Added

    🔄 Changed

    🛠 Fixed

    • 🛠 Fixed the build for OpenBSD (#1168)

    ✂ Removed

  • v0.16.0

    December 02, 2019

    ➕ Added

    • ➕ Added ptrace::seize(): similar to attach() on Linux but with better-defined semantics. (#1154)

    • ➕ Added Signal::as_str(): returns signal name as &'static str (#1138)

    • ➕ Added posix_fallocate. (#1105)

    • 0️⃣ Implemented Default for FdSet (#1107)

    • ➕ Added NixPath::is_empty. (#1107)

    • ➕ Added mkfifoat (#1133)

    • Added User::from_uid, User::from_name, User::from_gid and Group::from_name, (#1139)

    • ➕ Added linkat (#1101)

    • ➕ Added sched_getaffinity. (#1148)

    • ➕ Added optional Signal argument to ptrace::{detach, syscall} for signal injection. (#1083)

    🔄 Changed

    • sys::termios::BaudRate now implements TryFrom<speed_t> instead of From<speed_t>. The old From implementation would panic on failure. (#1159)

    • sys::socket::ControlMessage::ScmCredentials and sys::socket::ControlMessageOwned::ScmCredentials now wrap UnixCredentials rather than libc::ucred. (#1160)

    • sys::socket::recvmsg now takes a plain Vec instead of a CmsgBuffer implementor. If you were already using cmsg_space!, then you needn't worry. (#1156)

    • sys::socket::recvfrom now returns Result<(usize, Option<SockAddr>)> instead of Result<(usize, SockAddr)>. (#1145)

    • Signal::from_c_int has been replaced by Signal::try_from (#1113)

    • 🔄 Changed readlink and readlinkat to return OsString (#1109)

      # use nix::fcntl::{readlink, readlinkat};
      // the buffer argument of `readlink` and `readlinkat` has been removed,
      // and the return value is now an owned type (`OsString`).
      // Existing code can be updated by removing the buffer argument
      // and removing any clone or similar operation on the output
    
      // old code `readlink(&path, &mut buf)` can be replaced with the following
      let _: OsString = readlink(&path);
    
      // old code `readlinkat(dirfd, &path, &mut buf)` can be replaced with the following
      let _: OsString = readlinkat(dirfd, &path);
    
    • 👍 Minimum supported Rust version is now 1.36.0. (#1108)

    • Ipv4Addr::octets, Ipv4Addr::to_std, Error::as_errno, ForkResult::is_child, ForkResult::is_parent, Gid::as_raw, Uid::is_root, Uid::as_raw, Pid::as_raw, and PollFd::revents now take self by value. (#1107)

    • Type &CString for parameters of exec(v|ve|vp|vpe|veat) are changed to &CStr. (#1121)

    🛠 Fixed

    • 🛠 Fix length of abstract socket addresses (#1120)

    • 🛠 Fix initialization of msghdr in recvmsg/sendmsg when built with musl (#1136)

    ✂ Removed

    • ✂ Remove the deprecated CmsgSpace. (#1156)
  • v0.15.0

    August 10, 2019

    ➕ Added

    • ➕ Added MSG_WAITALL to MsgFlags in sys::socket. (#1079)
    • 👯 Implemented Clone, Copy, Debug, Eq, Hash, and PartialEq for most types that support them. (#1035)
    • Added copy_file_range wrapper (#1069)
    • ➕ Add mkdirat. (#1084)
    • ➕ Add posix_fadvise. (#1089)
    • ➕ Added AF_VSOCK to AddressFamily. (#1091)
    • ➕ Add unlinkat (#1058)
    • ➕ Add renameat. (#1097)

    🔄 Changed

    • 👌 Support for ifaddrs now present when building for Android. (#1077)
    • 👍 Minimum supported Rust version is now 1.31.0 (#1035) (#1095)
    • Now functions statfs() and fstatfs() return result with Statfs wrapper (#928)

    🛠 Fixed

    • Enabled sched_yield for all nix hosts. (#1090)

    ✂ Removed

  • v0.14.1

    June 07, 2019

    ➕ Added

    • Macros exported by nix may now be imported via use on the Rust 2018 edition without importing helper macros on Linux targets. (#1066)

    For example, in Rust 2018, the ioctl_read_bad! macro can now be imported without importing the convert_ioctl_res! macro.

      use nix::ioctl_read_bad;
    
      ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
    

    🔄 Changed

    • 🔄 Changed some public types from reexports of libc types like uint32_t to the native equivalents like u32. (#1072)

    🛠 Fixed

    • 🛠 Fix the build on Android and Linux/mips with recent versions of libc. (#1072)

    ✂ Removed

  • v0.14.0

    May 22, 2019

    ➕ Added

    • Add IP_RECVIF & IP_RECVDSTADDR. Enable IP_PKTINFO and IP6_PKTINFO on netbsd/openbsd. (#1002)
    • Added inotify_init1, inotify_add_watch and inotify_rm_watch wrappers for Android and Linux. (#1016)
    • Add ALG_SET_IV, ALG_SET_OP and ALG_SET_AEAD_ASSOCLEN control messages and AF_ALG socket types on Linux and Android (#1031)
    • ➕ Add killpg (#1034)
    • ➕ Added ENOTSUP errno support for Linux and Android. (#969)
    • ➕ Add several errno constants from OpenBSD 6.2 (#1036)
    • Added from_std and to_std methods for sys::socket::IpAddr (#1043)
    • ➕ Added nix::unistd:seteuid and nix::unistd::setegid for those platforms that do not support setresuid nor setresgid respectively. (#1044)
    • ➕ Added a access wrapper (#1045)
    • ➕ Add forkpty (#1042)
    • ➕ Add sched_yield (#1050)

    🔄 Changed

    • PollFd event flags renamed to PollFlags (#1024)
    • recvmsg now returns an Iterator over ControlMessageOwned objects rather than ControlMessage objects. This is sadly not backwards-compatible. Fix code like this: rust if let ControlMessage::ScmRights(&fds) = cmsg {

    By replacing it with code like this:

      if let ControlMessageOwned::ScmRights(fds) = cmsg {
    

    (#1020)

    • Replaced CmsgSpace with the cmsg_space macro. (#1020)

    🛠 Fixed

    • 🛠 Fixed multiple bugs when using sendmsg and recvmsg with ancillary control messages (#1020)
    • Macros exported by nix may now be imported via use on the Rust 2018 edition without importing helper macros for BSD targets. (#1041)

    For example, in Rust 2018, the ioctl_read_bad! macro can now be imported without importing the convert_ioctl_res! macro.

      use nix::ioctl_read_bad;
    
      ioctl_read_bad!(tcgets, libc::TCGETS, libc::termios);
    

    ✂ Removed

    • Daemon, NOTE_REAP, and NOTE_EXIT_REPARENTED are now deprecated on OSX and iOS. (#1033)
    • PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, and PTRACE_SETFPREGS have been removed from some platforms where they never should've been defined in the first place. (#1055)
  • v0.13.1

    June 10, 2019
  • v0.13.0

    January 15, 2019

    ➕ Added

    • ➕ Added PKTINFO(V4) & V6PKTINFO cmsg support - Android/FreeBSD/iOS/Linux/MacOS. (#990)
    • ➕ Added support of CString type in setsockopt. (#972)
    • ➕ Added option TCP_CONGESTION in setsockopt. (#972)
    • ➕ Added symlinkat wrapper. (#997)
    • ➕ Added ptrace::{getregs, setregs}. (#1010)
    • ➕ Added nix::sys::signal::signal. (#817)
    • ➕ Added an mprotect wrapper. (#991)

    🔄 Changed

    🛠 Fixed

    • lutimes never worked on OpenBSD as it is not implemented on OpenBSD. It has been removed. (#1000)
    • fexecve never worked on NetBSD or on OpenBSD as it is not implemented on either OS. It has been removed. (#1000)

    ✂ Removed

  • v0.12.1

    June 08, 2019