Skip to content

Releases: bytecodealliance/rustix

0.38.0

28 Jun 14:09
Compare
Choose a tag to compare
  • 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, for epoll, eventfd, and poll
    • rustix::pipe, for pipe, tee, splice, and related functions
    • rustix::procfs, for procfs-related APIs
    • rustix::stdio, for *std{in,out,err}
    • rustix::system, for uname, sysinfo, and sethostname
  • rustix::io changes:

    • SeekFrom was moved to rustix::fs.
  • rustix::net changes:

    • socket now takes an Option<Protocol> and Protocol no longer implements Default; change Protocol::default() to None.
    • sendmsg_noaddr is renamed to sendmsg.
    • getsockopt_nosigpipe and setsockopt_nosigpipe are renamed to get_socket_nosigpipe and set_socket_nosigpipe.
    • AcceptFlags is renamed to SocketFlags.
  • rustix::event changes:

    • epoll changes:
      • epoll::epoll_add, epoll::epoll_mod, and epoll::epoll_del were renamed to epoll::add, epoll::modify, and epoll::delete.
      • The EventVec iterator now returns Events rather than tuples.
      • epoll::Event::data is changed from a u64 to a custom EventData type which can hold either a u64 or a *mut c_void.
  • rustix::fs changes:

    • rustix::fs::chmodat_with is renamed to rustix::fs::chmodat.
    • rustix::fs::cwd() is replaced with rustix::fs::CWD.
      • Non-*at versions of several functions that implicitly operate on CWD were also added.
  • rustix::termios changes:

    • The API now fully supports arbitrary speeds. The cfsetispeed, cfsetospeed, cfsetspeed, tcsetattr2, and tcgetattr2 functions, as well as the CBAUD and CIBAUD constants, are replaced by set_input_speed, set_output_speed, and set_speed functions on Termios.
    • 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 the rustix::termios::speed module.
    • cfmakeraw is now called Termios::make_raw.
  • rustix::process changes:

    • Pid::from_raw is no longer unsafe.
    • Pid::from_raw_nonzero is removed, and a new Pid::from_raw_unchecked is added.
    • ReaperStatus::pid is now an Option<Pid>, as the OS doesn't always provide it.
  • rustix::io_uring changes:

    • io_uring_cqe now supports the big_cqe field, and no longer implements Copy and Clone.

0.37.20

11 Jun 13:43
Compare
Choose a tag to compare
  • Fix decoding of abstract unix sockets (#661)
  • Fix the fstat/statat/etc. fallback when statx fails with EPERM. (#666)
  • Add a rustix::pty module. (#673)
  • process: Add aliaseses for parent_process_death_signal (#677)
  • Fix panic on dropping RecvAncillaryBuffer after failed recvmsg (#676)

0.37.19

04 May 05:39
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.37.18...v0.37.19

0.36.9

04 Mar 08:13
Compare
Choose a tag to compare
  • Fixes undefined references to pwritev64v2, preadv64v2, getauxval, and setns on older glibc versions (#535 and #556)
  • Hopefully fixes the intermittent build errors (#544)

0.37.0

03 Mar 17:53
Compare
Choose a tag to compare

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's len argument changed from u64 to usize (#499)
  • io_uring::IoringRecvsendFlags is now split into separate send and
    receive types. (#553)
  • fs::seek now uses Rustix's own SeekFrom 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

15 Jun 23:40
Compare
Choose a tag to compare

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 to io::Errno.
  • fs::Dir no longer takes an OwnedFd. fs::Dir::read_from constructs a Dir without taking ownership of the passed-in fd, so users that need AsFd should use a separate OwnedFd to provide it.
  • mmap and related functions have moved to rustix::mm
  • Terminal-related ioctls have been renamed to their termios names and moved to rustix::termios.
  • ZStr and ZString have been replaced by CStr and CString.
  • dup2's second argument is now &mut OwnedFd.
  • io-lifetimes' as_filelike_view no longer provides &mut dereferences; to use with File I/O, do an extra &* on the view.
  • fchown and chownat now take Option<Uid> and Option<Gid> instead of publicly special-casing -1.
  • with_retrying is renamed to retry_on_intr