os_pipe.rs icon indicating copy to clipboard operation
os_pipe.rs copied to clipboard

Use rustix instead of libc in the Unix backend

Open notgull opened this issue 1 year ago • 1 comments

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.

notgull avatar May 02 '24 03:05 notgull

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

notgull avatar May 14 '24 01:05 notgull