Closed
Description
Here's a planning issue for a 1.0 release, similar to the one for the 0.38 release. Hopefully we won't need a semver bump for a good long while, but when we do, here's the list of changes we can make:
- Remove the deprecated mount functions in the
fs
module (details) - Make the underlying type of
rustix::fs::Access
consistent between linux_raw and libc backends (Port 1.0-staging to main #1152) - Rename
mount_recursive_bind
tomount_bind_recursive
? Factor out a new top-levelmount
module. #763 (comment) (Renamemount_recursive_bind
tomount_bind_recursive
. #1273) - Change
SeekFrom::Hole
andSeekFrom::Data
's field fromi64
tou64
. (Make the offsets forSeekFrom
'sHole
andData
unsigned. #1266) - rename
Shutdown::ReadWrite
toShutdown::Both
to align with std (RenameShutdown::ReadWrite
toShutdown::Both
. #1264) - remove the
features = ["extra_traits"]
from the libc dependency (Remove the "libc-extra-traits" feature. #1168) - move (or perhaps alias?)
sched_yield
and othersched_*
functions fromprocess
tothread
, since they apply to threads rather than processes on Linux etc. (Movesched_*
andmembarrier_*
intorustix::thread
. #1265) -
stx_mtime
and similar members ofStatx
should bei64
, because Unix timestamps can be negative. -
futex
's first argument should beAtomic
- Remove
get_
from sockopt getters, following Rust convention. Consider removingget_
in other things too. (Rename sockopts getters to remove the "get_". #1269) - The
udata
argument torustix::event::kqueue::Event::new
should be a pointer instead of anisize
in order to better preserve provenance. (Make APIs preserve strict provenance. #1270) - The
stx_attributes_mask
field ofStatx
with flags likelibc::STATX_ATTR_MOUNT_ROOT
should ideally be a bitflags, which requires makingStatx
a custom type (which should match layout withlibc::statx
). (Reorganize Stat, Statx, and SockaddrStorage #1282) - Rename
get_*
functions (eg. sockopts) to remove theget_
prefix, which is more idiomatic Rust? - Rename
MountPropagationFlags::SLAVE
(Rename a flag inMountPropagationFlags
. #1169) - Rename some of
WaitidOptions
,WaitidStatus
, and/orWaitId
to make the capitalization ofId
consistent (RenameWaidid*
toWaidId*
, for consistency withWaitId
. #1267) - Remove the
inotify_
prefixes from things in thefs::inotify
module. - Remove the
shm_
andShm
prefixes from things in theshm
module. - Figure out a way to do a
recv
into an uninitialized buffer with theTRUNC
flag set (see Fixrecv_uninit
to handle theTRUNC
flag. #1159) (Report the number of received bytes inrecv_uninit
andrecvfrom_uninit
. #1278) - remove rustix::procfs and publish rustix-linux-procfs as the replacement (Remove procfs. #1275)
- remove linux-raw-sys from the public API (Port 1.0-staging to main #1152) (Remove most linux-raw-sys types from the public API #1277) (Reorganize Stat, Statx, and SockaddrStorage #1282)
- change
io_uring_register_files_skip
from aconst fn
to a constant. (Replace theio_uring_register_files_skip
function with a constant. #1268)
Deferring for now:
- move rustix::thread sleep functions into a new rustix::sleep module, because they're usable from single-threaded programs too
- Move
Dir
into its own crate, and have rustix exportgetdents
directly? - Split
open
andopenat
into separate functions for "create" which needs a mode vs. "open existing" which doesn't need a mode? - Make
RecvAncillaryBuffer::drain
always remove all messages, even if the iterator isn't exhausted. With that, we can remove theread_and_length
inAncillaryDrain
. - Replace
rustix::cstr!
with something likerustix::nativestr!
so that users don't hard code "native strings are C strings" in their code? - rename
Arg::as_str
to avoid "a method with this name may be added to the standard library in the future" warnings rustix::process::waitpid
has no way to wait for specific process groups (Pid
now requires non-negative values).waitpgid
has been added as a temporary workaround.- remove libc from the public API (Port 1.0-staging to main #1152) (Remove most linux-raw-sys types from the public API #1277)
Don't do these:
set_ip_add_membership
/get_ip_add_membership
should takeaddress
andifindex
arguments and*_with_ifindex
should be removed.- Rename
ClockId::Uptime
on FreeBSD toBoottime
, since it's an alias