-
Notifications
You must be signed in to change notification settings - Fork 284
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
Port from libc to rustix on Unix platforms #847
Comments
@TimonPost What are your thoughts on this? If I submitted a PR, would it be accepted? |
Im doubting a little, a pr is welcome, but i think in general we got pretty simple usecases and most of them havent changed for years now. It seems rustix might bring a couple of extra dependencies - which would be my biggest consern. So could be good to check that out, certainly removing unsafe is better, but unsafe isnt a big issue directly if used right. |
|
even bringing in bitflags could cause duplicated versions to be included. It creates a dependency between rustix and crossterm where they need to use the same versions. Tho bitflags probably is quite stable. But again feel free to open PR and check what impact it has on the Cagro.lock |
Closes crossterm-rs#847 rustix is a wrapper around either raw Linux system calls or libc, based on the current platform. The main advantage is that it can make programs much more efficient, since system calls can be inlined directly into the functions that call them. I've seen rustix reduce instruction counts in my programs when I've made the switch in another programs. In addition, it reduces the amount of unsafe code. Signed-off-by: John Nunley <dev@notgull.net>
Closes crossterm-rs#847 rustix is a wrapper around either raw Linux system calls or libc, based on the current platform. The main advantage is that it can make programs much more efficient, since system calls can be inlined directly into the functions that call them. I've seen rustix reduce instruction counts in my programs when I've made the switch in another programs. In addition, it reduces the amount of unsafe code. Signed-off-by: John Nunley <dev@notgull.net>
Closes crossterm-rs#847 rustix is a wrapper around either raw Linux system calls or libc, based on the current platform. The main advantage is that it can make programs much more efficient, since system calls can be inlined directly into the functions that call them. I've seen rustix reduce instruction counts in my programs when I've made the switch in another programs. In addition, it reduces the amount of unsafe code. Signed-off-by: John Nunley <dev@notgull.net>
rustix
is a system call wrapper that wraps raw system calls on Linux andlibc
on other platforms. It would allowcrossterm
to refactor out error handling and unsafe syscall handling code from its codebase. In terms of speed,rustix
bypasseslibc
for Linux system calls. In some cases, this can allow system calls to be directly inlined into their calling functions, lowering the instruction count.rustix
currently supports all of the system calls that this crate uses. The only problem would be that it would bump the MSRV to 1.63, but if that isn't an issue then I can write a PR for this.The text was updated successfully, but these errors were encountered: