-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syscalls: switch to rustix for most of our syscalls
Using libc leads to several issues when dealing with multiarch that make things quite frustrating, and rustix does provide nicer APIs (for the most part -- some are a little wonky). One major annoyance is that building for musl leads to annoying build failures because musl uses differently-sized or differently-signed types, which we don't want to care about because we just want to use the actual kernel APIs. Also, musl is missing wrappers for things like statx(2) which we need to use. We still need syscall wrappers to provide nice error information, but we can remove most of the internal-only bitflags and unsafe blocks. The only syscall wrapper we don't switch to rustix is openat2 because rustix's API is not designed to be extensible and so we can stick with libc for now. In the future we might want to consider migrating away from libc entirely (to linux_raw_sys) to reduce the code bloat of having two different syscall wrappers. Signed-off-by: Aleksa Sarai <[email protected]>
- Loading branch information
Showing
13 changed files
with
451 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.