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 Vecs.
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, andpollrustix::pipe, forpipe,tee,splice, and related functionsrustix::procfs, for procfs-related APIsrustix::stdio, for*std{in,out,err}rustix::system, foruname,sysinfo, andsethostname
-
rustix::iochanges:SeekFromwas moved torustix::fs.
-
rustix::netchanges:socketnow takes anOption<Protocol>andProtocolno longer implementsDefault; changeProtocol::default()toNone.sendmsg_noaddris renamed tosendmsg.getsockopt_nosigpipeandsetsockopt_nosigpipeare renamed toget_socket_nosigpipeandset_socket_nosigpipe.AcceptFlagsis renamed toSocketFlags.
-
rustix::eventchanges:epollchanges:epoll::epoll_add,epoll::epoll_mod, andepoll::epoll_delwere renamed toepoll::add,epoll::modify, andepoll::delete.- The
EventVeciterator now returnsEvents rather than tuples. epoll::Event::datais changed from au64to a customEventDatatype which can hold either au64or a*mut c_void.
-
rustix::fschanges:rustix::fs::chmodat_withis renamed torustix::fs::chmodat.rustix::fs::cwd()is replaced withrustix::fs::CWD.- Non-
*atversions of several functions that implicitly operate onCWDwere also added.
- Non-
-
rustix::termioschanges:- The API now fully supports arbitrary speeds. The
cfsetispeed,cfsetospeed,cfsetspeed,tcsetattr2, andtcgetattr2functions, as well as theCBAUDandCIBAUDconstants, are replaced byset_input_speed,set_output_speed, andset_speedfunctions onTermios. - The speed macros such as
B9600are no longer required (B9600now 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::speedmodule. cfmakerawis now calledTermios::make_raw.
- The API now fully supports arbitrary speeds. The
-
rustix::processchanges:Pid::from_rawis no longerunsafe.Pid::from_raw_nonzerois removed, and a newPid::from_raw_uncheckedis added.ReaperStatus::pidis now anOption<Pid>, as the OS doesn't always provide it.
-
rustix::io_uringchanges:io_uring_cqenow supports thebig_cqefield, and no longer implementsCopyandClone.
0.37.20
0.37.19
What's Changed
- Fix no-std builds for MacOS and BSDs by @niluxv in #647
- Make
linkat,unlinkat, andrenameatweak 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_11cargo 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'slenargument changed fromu64tousize(#499)io_uring::IoringRecvsendFlagsis now split into separate send and
receive types. (#553)fs::seeknow uses Rustix's ownSeekFromtype 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::Erroris renamed toio::Errno.fs::Dirno longer takes anOwnedFd.fs::Dir::read_fromconstructs aDirwithout taking ownership of the passed-in fd, so users that needAsFdshould use a separateOwnedFdto provide it.mmapand related functions have moved torustix::mm- Terminal-related ioctls have been renamed to their termios names and moved to
rustix::termios. ZStrandZStringhave been replaced byCStrandCString.dup2's second argument is now&mut OwnedFd.- io-lifetimes'
as_filelike_viewno longer provides&mutdereferences; to use withFileI/O, do an extra&*on the view. fchownandchownatnow takeOption<Uid>andOption<Gid>instead of publicly special-casing -1.with_retryingis renamed toretry_on_intr