Skip to content

0.38.0

Latest
Compare
Choose a tag to compare
@sunfishcode sunfishcode released this 28 Jun 14:09
· 370 commits to main since this release
  • 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.