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
fexecve
on DragonFly. (#1577) - 🔀
sys::uio::IoVec
is nowSend
andSync
(#1582) - ➕ Added
EPOLLEXCLUSIVE
on Android. (#1567) - ➕ Added
fdatasync
for FreeBSD, Fuchsia, NetBSD, and OpenBSD. (#1581) - Added
sched_setaffinity
andsched_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
, andsetresgid
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 onOwningIter
. (#1563) - Added
process_vm_readv
andprocess_vm_writev
on Android. (#1557) - ➕ Added
nix::uncontext
module on s390x. (#1662) - Implemented
Extend
,FromIterator
, andIntoIterator
forSigSet
and addedSigSet::iter
andSigSetIter
. (#1553) - ➕ Added
ENOTRECOVERABLE
andEOWNERDEAD
error codes on DragonFly. (#1665) - Implemented
Read
andWrite
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 needuse std::iter::Extend
to callextend
on aSigSet
. (#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
andsetrlimit
to userlim_t
directly instead ofOption<rlim_t>
. (#1668) - 🗄 Deprecated
InetAddr
andSockAddr
in favor ofSockaddrIn
,SockaddrIn6
, andSockaddrStorage
. (#1684) - 🗄 Deprecated
IpAddr
,Ipv4Addr
, andIpv6Addr
in favor of their equivalents from the standard library. (#1685) uname
now returns aResult<UtsName>
instead of just aUtsName
and ignoring failures from libc. And getters on theUtsName
struct now return an&OsStr
instead of&str
. (#1672)- Replaced
IoVec
withIoSlice
andIoSliceMut
, and replacedIoVec::from_slice
withIoSlice::new
. (#1643)
🛠 Fixed
InetAddr::from_std
now sets thesin_len
/sin6_len
fields 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::contains
involving file descriptors outside of the range0..FD_SETSIZE
. (#1575)
-
v0.23.0 Changes
September 28, 2021➕ Added
- ➕ Added the
LocalPeerCred
sockopt. (#1482) - Added
TimeSpec::from_duration
andTimeSpec::from_timespec
(#1465) - ➕ Added
IPV6_V6ONLY
sockopt. (#1470) - ➕ Added
impl From<User> for libc::passwd
trait implementation to convert aUser
into alibc::passwd
. Consumes theUser
struct to give ownership over the member pointers. (#1471) - ➕ Added
pthread_kill
. (#1472) - ➕ Added
mknodat
. (#1473) - ➕ Added
setrlimit
andgetrlimit
. (#1302) - ➕ Added
ptrace::interrupt
method for platforms that supportPTRACE_INTERRUPT
(#1422) - Added
IP6T_SO_ORIGINAL_DST
sockopt. (#1490) - Added the
PTRACE_EVENT_STOP
variant to thesys::ptrace::Event
enum (#1335) - Exposed
SockAddr::from_raw_sockaddr
(#1447) - ➕ Added
TcpRepair
(#1503) - Enabled
pwritev
andpreadv
for more operating systems. (#1511) - ➕ Added support for
TCP_MAXSEG
TCP Maximum Segment Size socket options (#1292) - ➕ Added
Ipv4RecvErr
andIpv6RecvErr
sockopts and associated control messages. (#1514) - ➕ Added
AsRawFd
implementation onPollFd
. (#1516) - ➕ Added
Ipv4Ttl
andIpv6Ttl
sockopts. (#1515) - Added
MAP_EXCL
,MAP_ALIGNED_SUPER
, andMAP_CONCEAL
mmap flags, and exposedMAP_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 correspondinglibc::passwd::pw_gecos
are supported on 64-bit Android, change conditional compilation to include the field in 64-bit Android builds (#1471) - 👍
eventfd
s are supported on Android, change conditional compilation to includesys::eventfd::eventfd
andsys::eventfd::EfdFlags
for 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 aResult
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 aUnixAddr
from a rawsockaddr_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 inOk()
. (#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 ofToString::to_string
(#1495) - ✂ Removed
SigevNotify
on OpenBSD and Redox. (#1511)
- ➕ Added the
-
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 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
getresuid
andgetresgid
(#1430) - ➕ Added TIMESTAMPNS support for linux (#1402)
- ➕ Added
sendfile64
(#1439) - ➕ Added
MS_LAZYTIME
toMsFlags
(#1437)
🔄 Changed
- Made
forkpty
unsafe, likefork
(#1390) - Made
Uid
,Gid
andPid
methodsfrom_raw
andas_raw
aconst fn
(#1429) - Made
Uid::is_root
aconst fn
(#1429) - 📌
AioCb
is now always pinned. Once alibc::aiocb
gets 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) LioCb
is now constructed using a distinctLioCbBuilder
struct. 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 theerrno
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
andAioCb::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.AioCb
s 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
passwd
field toGroup
(#1338) - ➕ Added
mremap
(#1306) - ➕ Added
personality
(#1331) - ➕ Added limited Fuchsia support (#1285)
- ➕ Added
getpeereid
(#1342) - Implemented
IntoIterator
forDir
(#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 anAddrFamily::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
- ➕ 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
SockProtocol
enum (#1289) - Added
clock_gettime
,clock_settime
,clock_getres
,clock_getcpuclockid
functions andClockId
struct. (#1281) - Added wrapper functions for
PTRACE_SYSEMU
andPTRACE_SYSEMU_SINGLESTEP
. (#1300) - ➕ Add support for Vsock on Android rather than just Linux. (#1301)
- Added
TCP_KEEPCNT
andTCP_KEEPINTVL
TCP keepalive options. (#1283) ### 🔄 Changed - 🔦 Expose
SeekData
andSeekHole
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
- ➕ 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_
SIZE
family of flags. (#1211) - Added support for
F_OFD_*
fcntl
commands on Linux and Android. (#1195) - ➕ Added
env::clearenv()
: callslibc::clearenv
on platforms where it's available, and clears the environment of all variables viastd::env::vars
andstd::env::remove_var
on others. (#1185) FsType
inner value made public. (#1187)- ➕ Added
unistd::setfsuid
andunistd::setfsgid
to set the user or group identity for filesystem checks per-thread. (#1163) - Derived
Ord
,PartialOrd
forunistd::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
andrecvmmsg
calls (#1208) - ➕ Added support for
SCM_CREDS
messages (UnixCredentials
) on FreeBSD/DragonFly (#1216) - ➕ Added
BindToDevice
socket option (sockopt) on Linux (#1233) - Added
EventFilter
bitflags forEV_DISPATCH
andEV_RECEIPT
on OpenBSD. (#1252) - ➕ Added support for
Ipv4PacketInfo
andIpv6PacketInfo
toControlMessage
. (#1222) - 0️⃣
CpuSet
andUnixCredentials
now implementDefault
. (#1244) - ➕ Added
unistd::ttyname
(#1259) - ➕ Added support for
Ipv4PacketInfo
andIpv6PacketInfo
toControlMessage
for iOS and Android. (#1265) - ➕ Added support for
TimerFd
. (#1261)
🔄 Changed
- 🔄 Changed
fallocate
return type fromc_int
to()
(#1201) - 🐧 Enabled
sys::ptrace::setregs
andsys::ptrace::getregs
on x86_64-unknown-linux-musl target (#1198) - 🐧 On Linux,
ptrace::write
is now anunsafe
function. Caveat programmer. (#1245) execv
,execve
,execvp
andexecveat
in::nix::unistd
andreboot
in::nix::sys::reboot
now returnResult<Infallible>
instead ofResult<Void>
(#1239)sys::socket::sockaddr_storage_to_addr
is no longerunsafe
. So isoffset_of!
.sys::socket::sockaddr_storage_to_addr
,offset_of!
, andErrno::clear
are no longerunsafe
.SockAddr::as_ffi_pair
,sys::socket::sockaddr_storage_to_addr
,offset_of!
, andErrno::clear
are no longerunsafe
. (#1244)- Several
Inotify
methods now takeself
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
toaf_alg_iv
(#1206)🛠 Fixed
readlink
/readlinkat
when reading symlinks longer thanPATH_MAX
(#1231)PollFd
,EpollEvent
,IpMembershipRequest
,Ipv6MembershipRequest
,TimeVal
, andIoVec
are 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_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
forOption<P> where P: NixPath
. Most Nix functions that acceptNixPath
arguments can't do anything useful withNone
. The exceptions (mount
andquotactl_sync
) already take explicitly optional arguments. (#1242)✂ Removed
unistd::daemon
andunistd::pipe2
on OSX and ios (#1255)Removed
sys::event::FilterFlag::NOTE_EXIT_REPARENTED
andsys::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)
- ➕ Added