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

Switch to rustix from libc #73

Merged
merged 4 commits into from
Sep 3, 2023
Merged

Switch to rustix from libc #73

merged 4 commits into from
Sep 3, 2023

Conversation

notgull
Copy link
Contributor

@notgull notgull commented Aug 30, 2023

This commit replaces the code using libc with equivalent code using rustix. In addition to safety, this move also removes the dependency on C code and replaces it with a syscall, which is much faster.

This PR also adds forbid(unsafe_code), so that this crate shows up as unsafe-free when processed in cargo-geiger.

real_rustix_patriots

@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Aug 30, 2023

Hey @notgull thanks for your PR! Could you rebase this onto master so that we can validate it passes on stable CI? Apologies, our CI wasn't functional when you submitted this.

Cargo.toml Outdated Show resolved Hide resolved
This commit replaces the code using libc with equivalent code using
rustix. In addition to safety, this move also removes the dependency on
C code and replaces it with a syscall, which is much faster.

This PR also adds `forbid(unsafe_code)`, so that this crate shows up as
unsafe-free when processed in `cargo-geiger`.

Signed-off-by: John Nunley <[email protected]>
@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Aug 31, 2023

@notgull this is failing on MacOS, please review the CI logs

Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
@Xaeroxe Xaeroxe merged commit 2615c74 into harryfei:master Sep 3, 2023
12 checks passed
@Xaeroxe
Copy link
Collaborator

Xaeroxe commented Sep 3, 2023

Thanks for your contribution!

@notgull notgull deleted the rustix branch September 3, 2023 19:57
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

Successfully merging this pull request may close these issues.

2 participants