-
Notifications
You must be signed in to change notification settings - Fork 168
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
1.0 release planning #753
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
If this is going to be a stable release, we should make sure that In my opinion a stable release is a bad idea, as the API is still somewhat volatile. There should at least be an "unstable" feature flag to test new APIs for inclusion, like Tokio has. |
I already consider 0.38 to be stable. For example, I maintain an older version of linux-raw-sys to preserve compatibility with rustix 0.38. And I'm not aware of any significant volatility in the 0.38 API. It's added lots of features, and even deprecated a handful of things, but ideas for breaking changes are collected here in this issue, specifically to keep 0.38 stable. So my idea for 1.0 is just to better communicate what's already happening. It would be nice to better encapsulate libc/linux-raw-sys types, and I'm open to adding an "unstable" feature flag if there's a need for it. I'm under the impression that these aren't urgent right now, though I'd be happy to learn more about how these impact users. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I'd like to propose making the |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment has been minimized.
This comment has been minimized.
From #1110 (comment): Sidenote: the deprecations won't actually work due to rust-lang/rust#30827. (For example the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
As discussed [here], use generic parameters instead of impl trait argumentst. [here]: #753 (comment)
All todo items here are now either fixed, have posted PRs, or are tentatively recategorized to "Defering for now". I'll give these some time, while I work on documenting the changes in CHANGELOG.md and do extra testing and tidying, but the end is now in sight.
A PR doing this for all public APIs is posted at #1283.
In my experience the autocomplete is ok once one has the appropriate I've now filed #1284 to use this style in the port API, and I've ensured that all modules using this style have examples showing the appropriate eventfd is just one function and one type so I don't think it needs a
I haven't yet made this change. I do like how it makes the interface clearer, but I'm unsure about the range check it introduces.
With #1152 now landed, #1277 and #1282 remove the last linux-raw-sys types from the public API. I haven't yet removed all the libc types when using the libc backend. That would require duplicating a lot of platform-specific types like None of this is final at this point; I'm open to feedback here. |
By this do you mean that we're limiting possible inputs the caller can supply (namely no negative numbers). I feel like that's reasonable as we probably want a different API if negative numbers start meaning something else. I'd really like to see the story around MaybeUninit buffers resolved for 1.0 (or a clear expectation that there will be a 2.0 addressing the issue). I'm still on team dependent types (as in the input to the function determines the return type), but I'm not sure how we should hash this out. |
If it's
Is that #1108 and #1110? Thanks for the reminder; I'll take another look at those before the release. |
If we can, that sounds even better! Yup, mostly #1110 as I think it could have ripple effects (e.g. getting rid of |
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:
fs
module (details)rustix::fs::Access
consistent between linux_raw and libc backends (Port 1.0-staging to main #1152)mount_recursive_bind
tomount_bind_recursive
? Factor out a new top-levelmount
module. #763 (comment) (Renamemount_recursive_bind
tomount_bind_recursive
. #1273)SeekFrom::Hole
andSeekFrom::Data
's field fromi64
tou64
. (Make the offsets forSeekFrom
'sHole
andData
unsigned. #1266)Shutdown::ReadWrite
toShutdown::Both
to align with std (RenameShutdown::ReadWrite
toShutdown::Both
. #1264)features = ["extra_traits"]
from the libc dependency (Remove the "libc-extra-traits" feature. #1168)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
get_
from sockopt getters, following Rust convention. Consider removingget_
in other things too. (Rename sockopts getters to remove the "get_". #1269)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)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)get_*
functions (eg. sockopts) to remove theget_
prefix, which is more idiomatic Rust?MountPropagationFlags::SLAVE
(Rename a flag inMountPropagationFlags
. #1169)WaitidOptions
,WaitidStatus
, and/orWaitId
to make the capitalization ofId
consistent (RenameWaidid*
toWaidId*
, for consistency withWaitId
. #1267)inotify_
prefixes from things in thefs::inotify
module.shm_
andShm
prefixes from things in theshm
module.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)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:
Dir
into its own crate, and have rustix exportgetdents
directly?open
andopenat
into separate functions for "create" which needs a mode vs. "open existing" which doesn't need a mode?RecvAncillaryBuffer::drain
always remove all messages, even if the iterator isn't exhausted. With that, we can remove theread_and_length
inAncillaryDrain
.rustix::cstr!
with something likerustix::nativestr!
so that users don't hard code "native strings are C strings" in their code?Arg::as_str
to avoid "a method with this name may be added to the standard library in the future" warningsrustix::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.Don't do these:
set_ip_add_membership
/get_ip_add_membership
should takeaddress
andifindex
arguments and*_with_ifindex
should be removed.ClockId::Uptime
on FreeBSD toBoottime
, since it's an aliasThe text was updated successfully, but these errors were encountered: