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

Use rustix instead of libc in the Unix backend #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

notgull
Copy link
Contributor

@notgull notgull commented May 2, 2024

rustix is a crate that provides an interface to system functions on
Unix-like operating systems. It is a wrapper around Linux syscalls on
Linux and libc on other operating systems. In addition to being safer,
since it uses direct syscalls it reduces instruction counts on Linux.

This commit replaces usages of libc with rustix. In addition to removing
all unsafe code from the unix backend, it should also speed it up a
little on Linux. Note that this bumps the MSRV of this crate to v1.63.
This makes the "io-safety" feature useless, so I've made it an empty
feature.

rustix is a crate that provides an interface to system functions on
Unix-like operating systems. It is a wrapper around Linux syscalls on
Linux and libc on other operating systems. In addition to being safer,
since it uses direct syscalls it reduces instruction counts on Linux.

This commit replaces usages of libc with rustix. In addition to removing
all unsafe code from the unix backend, it should also speed it up a
little on Linux. Note that this bumps the MSRV of this crate to v1.63.
This makes the "io-safety" feature useless, so I've made it an empty
feature.

Signed-off-by: John Nunley <dev@notgull.net>
@notgull
Copy link
Contributor Author

notgull commented May 14, 2024

@oconnor663 Any chance you can take a look at this?

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.

None yet

1 participant