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

Remove linux-raw-sys and libc from public API #951

Closed
wants to merge 2 commits into from

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Nov 28, 2023

This prevents libc and linux-raw-sys from affecting the semver status of this crate.

@sunfishcode sunfishcode added the semver bump Issues that will require a semver-incompatible fix label Nov 29, 2023
@sunfishcode
Copy link
Member

Cool, this is great. This is an API break, so this will need to go in rustix 1.0. There isn't yet any timeline for rustiix 1.0—feedback is welcome—and until we have one, would you mind resubmitting this PR to the 1.0-staging branch that I've now created for this purpose?

One type that seems missing here is Stat, which is currently an alias for libc::stat on most platforms. We should ideally define our own Stat struct, and my rough idea was that we could use the assert macros in src/check_types.rs for checking that our layout matches the libc layout so that we can cast *mut libc::stat to *mut Stat, but I'm open to other approaches.

It would also be good to have asserts/tests somewhere checking that things like pid_t/uid_t/gid_t/etc. are not larger than the types we're using for them.

This prevents libc and linux-raw-sys from affecting the semver status of
this crate.

Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver bump Issues that will require a semver-incompatible fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants