Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.38 release planning #578

Closed
17 tasks done
sunfishcode opened this issue Mar 29, 2023 · 27 comments
Closed
17 tasks done

0.38 release planning #578

sunfishcode opened this issue Mar 29, 2023 · 27 comments

Comments

@sunfishcode
Copy link
Member

sunfishcode commented Mar 29, 2023

As of this writing, Rustix 0.37 was released about a month ago, and many crates started adopting it a few days ago. We hopefully won't need another semver bump for quite a while.

This issue is for collecting changes that we should make in 0.38, when the time comes. So far, I'm aware of:

@sunfishcode

This comment was marked as outdated.

@sunfishcode

This comment was marked as outdated.

@sunfishcode

This comment was marked as outdated.

@valpackett
Copy link
Contributor

  • Consider changing kqueue kevent(…) API a little
    • It's strange that changelist and eventlist aren't Option<>; normally when you manage events you pass NULL, 0 as eventlist, nevents and when you wait for events you pass NULL, 0 as changelist, nchanges. Dummy references to unused things are mehhh
    • I'm not a fan of the changelist vec capacity thing, the implicit requirement to allocate vec capacity isn't obvious, it's a footgun: if you try to wait for events but you pass a vec with 0 capacity, you'll spin endlessly instead of waiting. I've documented this in Add kqueue signal filter #582 but I'm not sure what the best solution would be
      • just implicitly reserving some small number sounds reasonable I guess?
      • or get rid of the vec and use a slice, making it a lot more obvious? (also this would allow using arena allocators etc. instead of vec, haha)

@sunfishcode

This comment was marked as outdated.

@sunfishcode

This comment was marked as outdated.

@sunfishcode

This comment was marked as outdated.

@KodrAus

This comment was marked as resolved.

@sunfishcode

This comment was marked as resolved.

@notgull

This comment was marked as off-topic.

@KodrAus

This comment was marked as resolved.

@sunfishcode

This comment was marked as off-topic.

@notgull
Copy link
Contributor

notgull commented Apr 19, 2023

Something to consider might be making it so you can store epoll/kqueue/etc events on the stack instead of in a Vec. Would probably require a trait over some kind of ArrayVec

@valpackett
Copy link
Contributor

kqueue only uses Vec for the length manipulation, we could really just extract that part and offer an fn kevent_raw or something (name subject to bikeshedding) without the semver bump

@SUPERCILEX

This comment was marked as resolved.

@notgull

This comment was marked as resolved.

@sunfishcode

This comment was marked as resolved.

@sunfishcode

This comment was marked as outdated.

@notgull

This comment was marked as outdated.

@sunfishcode

This comment was marked as resolved.

@sunfishcode

This comment was marked as resolved.

@sunfishcode

This comment was marked as resolved.

@notgull

This comment was marked as resolved.

@sunfishcode
Copy link
Member Author

The 0.38-planning branch is now landed on main. There are a few more changes listed above that I'd like to get in before the 0.38 release, as listed in the top comment here, but hopefully those won't take long.

@sunfishcode
Copy link
Member Author

sunfishcode commented Jun 17, 2023

Drafting a 0.38 API changes guide (I'll add this to the github release notes too):

  • 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.

@sunfishcode
Copy link
Member Author

There's now a 0.38.0-alpha.2 prelrelease up with everything I'm planning to include in the 0.38.0 release, except for #695.

@sunfishcode
Copy link
Member Author

rustix 0.38.0 is now released! See the release notes for the list of user-visible changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants