Releases: bytecodealliance/rustix
1.0.0
This release introduces the Buffer
trait, which is used in read
, pread
, recv
, recvfrom
, getrandom
, readlinkat_raw
, epoll::wait
, kevent
, port::getn
, getxattr
, lgetxattr
, fgetxattr
, listxattr
, llistxattr
, and flistxattr
, and adds support for reading data into uninitialized buffers, as well as safely reading data into the spare capacity of Vec
s.
This release also simplifies the way network addresses are handled. Instead of having separate functions with _v4
, _v6
, _unix
, _xdp
, and now _netlink
suffixes, rustix now uses a SocketAddrArg
trait so that functions such as bind
, connect
, sendto
, and sendmsg_addr
can accept any type of address, and are easier to extend to new address types in the future.
And, this release simplifies the ioctl
API, replacing opcode wrapper types with const generics.
This updates several APIs to add Linux 6.13 features, and raw linux-raw-sys types are no longer exposed in the public API, so it should be easier to stay up to date with new Linux releases.
And many more new features, bug fixes, and cleanups. See the CHANGES.md file for the full list of breaking changes.
0.38.0
-
Meta:
- Rust 1.63
- bitflags 2
- significant compile-time improvements
-
Some APIs were factored out into new toplevel API modules, with their
corresponding cargo feature flags:rustix::event
, forepoll
,eventfd
, andpoll
rustix::pipe
, forpipe
,tee
,splice
, and related functionsrustix::procfs
, for procfs-related APIsrustix::stdio
, for*std{in,out,err}
rustix::system
, foruname
,sysinfo
, andsethostname
-
rustix::io
changes:SeekFrom
was moved torustix::fs
.
-
rustix::net
changes:socket
now takes anOption<Protocol>
andProtocol
no longer implementsDefault
; changeProtocol::default()
toNone
.sendmsg_noaddr
is renamed tosendmsg
.getsockopt_nosigpipe
andsetsockopt_nosigpipe
are renamed toget_socket_nosigpipe
andset_socket_nosigpipe
.AcceptFlags
is renamed toSocketFlags
.
-
rustix::event
changes:epoll
changes:epoll::epoll_add
,epoll::epoll_mod
, andepoll::epoll_del
were renamed toepoll::add
,epoll::modify
, andepoll::delete
.- The
EventVec
iterator now returnsEvent
s rather than tuples. epoll::Event::data
is changed from au64
to a customEventData
type which can hold either au64
or a*mut c_void
.
-
rustix::fs
changes:rustix::fs::chmodat_with
is renamed torustix::fs::chmodat
.rustix::fs::cwd()
is replaced withrustix::fs::CWD
.- Non-
*at
versions of several functions that implicitly operate onCWD
were also added.
- Non-
-
rustix::termios
changes:- The API now fully supports arbitrary speeds. The
cfsetispeed
,cfsetospeed
,cfsetspeed
,tcsetattr2
, andtcgetattr2
functions, as well as theCBAUD
andCIBAUD
constants, are replaced byset_input_speed
,set_output_speed
, andset_speed
functions onTermios
. - The speed macros such as
B9600
are no longer required (B9600
now always has the value 9600, and so on for all the other speed macros), but they can still be used. They're now in therustix::termios::speed
module. cfmakeraw
is now calledTermios::make_raw
.
- The API now fully supports arbitrary speeds. The
-
rustix::process
changes:Pid::from_raw
is no longerunsafe
.Pid::from_raw_nonzero
is removed, and a newPid::from_raw_unchecked
is added.ReaperStatus::pid
is now anOption<Pid>
, as the OS doesn't always provide it.
-
rustix::io_uring
changes:io_uring_cqe
now supports thebig_cqe
field, and no longer implementsCopy
andClone
.
0.37.20
0.37.19
What's Changed
- Fix no-std builds for MacOS and BSDs by @niluxv in #647
- Make
linkat
,unlinkat
, andrenameat
weak on macos. by @sunfishcode in #649
Full Changelog: v0.37.18...v0.37.19
0.36.9
0.37.0
New features:
- solaris ports API
- FreeBSD kqueue API
- Expanded io_uring coverage
- termios2, inotify, pidfd_open, witid, set{u,g}id, cap{g,s}et, unmount
SO_NOSIGPIPE
,SEEK_DATA
,SEEK_HOLE
- A new
linux_4_11
cargo feature to optimize for Linux versions >= 4.11.
Changes:
- stdout/etc. are now a safe functions (in "std" mode) (#519)
- epoll no longer has a context (#487)
copy_file_range
'slen
argument changed fromu64
tousize
(#499)io_uring::IoringRecvsendFlags
is now split into separate send and
receive types. (#553)fs::seek
now uses Rustix's ownSeekFrom
type rather than
std::io::SeekFrom
(#486)- Some of the Linux capabilities functions were renamed. (#500)
And many bug fixes, including hopefully a fix for the intermittent build failures (#526).
0.35.6
API changes include:
- Most of the API is now behind feature flags. For example, to use
rustix::fs
, enable the "fs" feature. io::Error
is renamed toio::Errno
.fs::Dir
no longer takes anOwnedFd
.fs::Dir::read_from
constructs aDir
without taking ownership of the passed-in fd, so users that needAsFd
should use a separateOwnedFd
to provide it.mmap
and related functions have moved torustix::mm
- Terminal-related ioctls have been renamed to their termios names and moved to
rustix::termios
. ZStr
andZString
have been replaced byCStr
andCString
.dup2
's second argument is now&mut OwnedFd
.- io-lifetimes'
as_filelike_view
no longer provides&mut
dereferences; to use withFile
I/O, do an extra&*
on the view. fchown
andchownat
now takeOption<Uid>
andOption<Gid>
instead of publicly special-casing -1.with_retrying
is renamed toretry_on_intr