Changelog History
Page 1
-
v0.24.1 Changes
April 22, 2022 -
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
fexecveon DragonFly. (#1577) - ๐
sys::uio::IoVecis nowSendandSync(#1582) - โ Added
EPOLLEXCLUSIVEon Android. (#1567) - โ Added
fdatasyncfor FreeBSD, Fuchsia, NetBSD, and OpenBSD. (#1581) - Added
sched_setaffinityandsched_getaffinityon DragonFly. (#1537) - โ Added
posix_fallocateon DragonFly. (#1621) - โ Added
SO_TIMESTAMPINGsupport (#1547) - โ Added getter methods to
MqAttrstruct (#1619) - โ Added the
TxTimesockopt and control message. (#1564) - โ Added POSIX per-process timer support (#1622)
- โ Added
sendfileon DragonFly. (#1615) - Added
UMOUNT_NOFOLLOW,FUSE_SUPER_MAGICon Linux. (#1634) - โ Added
getresuid,setresuid,getresgid, andsetresgidon DragonFly, FreeBSD, and OpenBSD. (#1628) - ๐ Added
MAP_FIXED_NOREPLACEon Linux. (#1636) - โ Added
fspacectlon FreeBSD (#1640) - โ Added
accept4on DragonFly, Emscripten, Fuchsia, Illumos, and NetBSD. (#1654) - โ Added
AsRawFdimplementation onOwningIter. (#1563) - Added
process_vm_readvandprocess_vm_writevon Android. (#1557) - โ Added
nix::uncontextmodule on s390x. (#1662) - Implemented
Extend,FromIterator, andIntoIteratorforSigSetand addedSigSet::iterandSigSetIter. (#1553) - โ Added
ENOTRECOVERABLEandEOWNERDEADerror codes on DragonFly. (#1665) - Implemented
ReadandWritefor&PtyMaster(#1664) - โ Added
MSG_NOSIGNALfor Android, Dragonfly, FreeBSD, Fuchsia, Haiku, Illumos, Linux, NetBSD, OpenBSD and Solaris. (#1670) - โ Added
waitid. (#1584) - โ Added
Ipv6DontFragfor android, iOS, linux and macOS. - โ Added
IpDontFragfor iOS, macOS. (#1692)
๐ Changed
mqueuefunctions now operate on a distinct type,nix::mqueue::MqdT. Accessors take this type by reference, not by value. (#1639)- โ Removed
SigSet::extendin favor of<SigSet as Extend<Signal>>::extend. Because of this change, you now needuse std::iter::Extendto callextendon aSigSet. (#1553) - โ Removed the the
PATH_MAXrestriction 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
getrlimitandsetrlimitto userlim_tdirectly instead ofOption<rlim_t>. (#1668) - ๐ Deprecated
InetAddrandSockAddrin favor ofSockaddrIn,SockaddrIn6, andSockaddrStorage. (#1684) - ๐ Deprecated
IpAddr,Ipv4Addr, andIpv6Addrin favor of their equivalents from the standard library. (#1685) unamenow returns aResult<UtsName>instead of just aUtsNameand ignoring failures from libc. And getters on theUtsNamestruct now return an&OsStrinstead of&str. (#1672)- Replaced
IoVecwithIoSliceandIoSliceMut, and replacedIoVec::from_slicewithIoSlice::new. (#1643)
๐ Fixed
InetAddr::from_stdnow sets thesin_len/sin6_lenfields on the BSDs. (#1642)- ๐ Fixed a panic in
LinkAddr::addr. That function now returns anOption. (#1675) (#1677)
โ Removed
-
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, andFdSet::containsinvolving file descriptors outside of the range0..FD_SETSIZE. (#1575)
-
v0.23.0 Changes
September 28, 2021โ Added
- โ Added the
LocalPeerCredsockopt. (#1482) - Added
TimeSpec::from_durationandTimeSpec::from_timespec(#1465) - โ Added
IPV6_V6ONLYsockopt. (#1470) - โ Added
impl From<User> for libc::passwdtrait implementation to convert aUserinto alibc::passwd. Consumes theUserstruct to give ownership over the member pointers. (#1471) - โ Added
pthread_kill. (#1472) - โ Added
mknodat. (#1473) - โ Added
setrlimitandgetrlimit. (#1302) - โ Added
ptrace::interruptmethod for platforms that supportPTRACE_INTERRUPT(#1422) - Added
IP6T_SO_ORIGINAL_DSTsockopt. (#1490) - Added the
PTRACE_EVENT_STOPvariant to thesys::ptrace::Eventenum (#1335) - Exposed
SockAddr::from_raw_sockaddr(#1447) - โ Added
TcpRepair(#1503) - Enabled
pwritevandpreadvfor more operating systems. (#1511) - โ Added support for
TCP_MAXSEGTCP Maximum Segment Size socket options (#1292) - โ Added
Ipv4RecvErrandIpv6RecvErrsockopts and associated control messages. (#1514) - โ Added
AsRawFdimplementation onPollFd. (#1516) - โ Added
Ipv4TtlandIpv6Ttlsockopts. (#1515) - Added
MAP_EXCL,MAP_ALIGNED_SUPER, andMAP_CONCEALmmap flags, and exposedMAP_ANONYMOUSfor 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::gecosand correspondinglibc::passwd::pw_gecosare 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 includesys::eventfd::eventfdandsys::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::filternow returns aResultinstead 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
UnixAddrto encapsulate internals better in order to fix soundness issues. No longer allows creating aUnixAddrfrom a rawsockaddr_un. (#1496) - Raised bitflags to 1.3.0 and the MSRV to 1.46.0. (#1492)
๐ Fixed
posix_fadvisenow returns errors in the conventional way, rather than as a non-zero value inOk(). (#1538)- โ Added more errno definitions for better backwards compatibility with Nix 0.21.0. (#1467)
- ๐ Fixed potential undefined behavior in
Signal::try_fromon 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_strin favor ofToString::to_string(#1495) - โ Removed
SigevNotifyon OpenBSD and Redox. (#1511)
- โ Added the
-
v0.22.0 Changes
July 09, 2021โ Added
- โ Added
if_nameindex(#1445) - โ Added
nmountfor FreeBSD. (#1453) - โ Added
IpFreebindsocket option (sockopt) on Linux, Fuchsia and Android. (#1456) - โ Added
TcpUserTimeoutsocket option (sockopt) on Linux and Fuchsia. (#1457) - โ Added
renameat2for Linux (#1458) - โ Added
RxqOvflsupport on Linux, Fuchsia and Android. (#1455)
๐ Changed
ptsname_rnow returns a lossily-converted string in the event of bad UTF, just likeptsname. (#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 alsoClone,Copy,Eq, and has a small fixed size. It also requires less typing. For example, the old enum variantnix::Error::Sys(nix::errno::Errno::EINVAL)is now simplynix::Error::EINVAL. (#1446)
๐ Fixed
โ Removed
- โ Added
-
v0.21.0 Changes
May 31, 2021โ Added
- โ Added
getresuidandgetresgid(#1430) - โ Added TIMESTAMPNS support for linux (#1402)
- โ Added
sendfile64(#1439) - โ Added
MS_LAZYTIMEtoMsFlags(#1437)
๐ Changed
- Made
forkptyunsafe, likefork(#1390) - Made
Uid,GidandPidmethodsfrom_rawandas_rawaconst fn(#1429) - Made
Uid::is_rootaconst fn(#1429) - ๐
AioCbis now always pinned. Once alibc::aiocbgets sent to the kernel, its address in memory must not change. Nix now enforces that by usingstd::pin. Most users won't need to change anything, except when usingaio_suspend. See that method's documentation for the new usage. (#1440) LioCbis now constructed using a distinctLioCbBuilderstruct. This avoids a soundness issue with the oldLioCb. 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 theerrnomodule. (#1452)
๐ Fixed
- ๐ Allow
sockaddr_llsize, as reported by the Linux kernel, to be smaller then it's definition (#1395) - ๐ Fix spurious errors using
sendmmsgwith multiple cmsgs (#1414) - โ Added
Errno::EOPNOTSUPPto FreeBSD, where it was missing. (#1452)
โ Removed
- โ Removed
sys::socket::accept4from Android arm because libc removed it in version 0.2.87. (#1399) AioCb::from_boxed_sliceandAioCb::from_boxed_mut_slicehave 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)
- โ Added
-
v0.20.0 Changes
February 20, 2021โ Added
- โ Added a
passwdfield toGroup(#1338) - โ Added
mremap(#1306) - โ Added
personality(#1331) - โ Added limited Fuchsia support (#1285)
- โ Added
getpeereid(#1342) - Implemented
IntoIteratorforDir(#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
recvfromon anAddrFamily::Packetsocket (#1344)
๐ Fixed
TimerFdnow closes the underlying fd on drop. (#1381)- ๐ง Define
*_MAGICfilesystem constants on Linux s390x (#1372) - mqueue, sysinfo, timespec, statfs, test_ptrace_syscall() on x32 (#1366)
โ Removed
- โ Added a
-
v0.19.1 Changes
November 28, 2020๐ Fixed
- ๐ Fixed bugs in
recvmmsg. (#1341)
- ๐ Fixed bugs in
-
v0.19.0 Changes
October 06, 2020โ Added
- โ Added Netlink protocol families to the
SockProtocolenum (#1289) - Added
clock_gettime,clock_settime,clock_getres,clock_getcpuclockidfunctions andClockIdstruct. (#1281) - Added wrapper functions for
PTRACE_SYSEMUandPTRACE_SYSEMU_SINGLESTEP. (#1300) - โ Add support for Vsock on Android rather than just Linux. (#1301)
- Added
TCP_KEEPCNTandTCP_KEEPINTVLTCP keepalive options. (#1283) ### ๐ Changed - ๐ฆ Expose
SeekDataandSeekHoleon 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::forkan unsafe funtion, bringing it in line with libstd's decision. (#1293) ### ๐ Fixed ### โ Removed
- โ Added Netlink protocol families to the
-
v0.18.0 Changes
July 26, 2020โ Added
- โ Added
fchown(2)wrapper. (#1257) - Added support on linux systems for
MAP_HUGE_SIZEfamily of flags. (#1211) - Added support for
F_OFD_*fcntlcommands on Linux and Android. (#1195) - โ Added
env::clearenv(): callslibc::clearenvon platforms where it's available, and clears the environment of all variables viastd::env::varsandstd::env::remove_varon others. (#1185) FsTypeinner value made public. (#1187)- โ Added
unistd::setfsuidandunistd::setfsgidto set the user or group identity for filesystem checks per-thread. (#1163) - Derived
Ord,PartialOrdforunistd::Pid(#1189) - โ Added
select::FdSet::fdsmethod 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
sendmmsgandrecvmmsgcalls (#1208) - โ Added support for
SCM_CREDSmessages (UnixCredentials) on FreeBSD/DragonFly (#1216) - โ Added
BindToDevicesocket option (sockopt) on Linux (#1233) - Added
EventFilterbitflags forEV_DISPATCHandEV_RECEIPTon OpenBSD. (#1252) - โ Added support for
Ipv4PacketInfoandIpv6PacketInfotoControlMessage. (#1222) - 0๏ธโฃ
CpuSetandUnixCredentialsnow implementDefault. (#1244) - โ Added
unistd::ttyname(#1259) - โ Added support for
Ipv4PacketInfoandIpv6PacketInfotoControlMessagefor iOS and Android. (#1265) - โ Added support for
TimerFd. (#1261)
๐ Changed
- ๐ Changed
fallocatereturn type fromc_intto()(#1201) - ๐ง Enabled
sys::ptrace::setregsandsys::ptrace::getregson x86_64-unknown-linux-musl target (#1198) - ๐ง On Linux,
ptrace::writeis now anunsafefunction. Caveat programmer. (#1245) execv,execve,execvpandexecveatin::nix::unistdandrebootin::nix::sys::rebootnow returnResult<Infallible>instead ofResult<Void>(#1239)sys::socket::sockaddr_storage_to_addris no longerunsafe. So isoffset_of!.sys::socket::sockaddr_storage_to_addr,offset_of!, andErrno::clearare no longerunsafe.SockAddr::as_ffi_pair,sys::socket::sockaddr_storage_to_addr,offset_of!, andErrno::clearare no longerunsafe. (#1244)- Several
Inotifymethods now takeselfby value instead of by reference (#1244) - ๐
nix::poll::ppoll:timeoutparameter 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_datatoaf_alg_iv(#1206)๐ Fixed
readlink/readlinkatwhen reading symlinks longer thanPATH_MAX(#1231)PollFd,EpollEvent,IpMembershipRequest,Ipv6MembershipRequest,TimeVal, andIoVecare nowrepr(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_sockaddrfrom the public API. (#1215) Removed
sys::termios::{get_libc_termios, get_libc_termios_mut, update_wrapperfrom the public API. These were previously hidden in the docs but still usable by downstream. (#1235)Nix no longer implements
NixPathforOption<P> where P: NixPath. Most Nix functions that acceptNixPatharguments can't do anything useful withNone. The exceptions (mountandquotactl_sync) already take explicitly optional arguments. (#1242)โ Removed
unistd::daemonandunistd::pipe2on OSX and ios (#1255)Removed
sys::event::FilterFlag::NOTE_EXIT_REPARENTEDandsys::event::FilterFlag::NOTE_REAPon OSX and ios. (#1255)โ Removed
sys::ptrace::ptraceon Android and Linux. (#1255)โฌ๏ธ Dropped support for powerpc64-unknown-linux-gnu (#1266)
- โ Added