Closed josephlr closed 4 years ago
I'd be thrilled to do this. However, first I think the test suite should be improved to help ensure that we're not breaking behavior with our implementation. There are some more advanced functionality bits that we're using that are incidental (mainly EOPNOTSUPP
holes). Most of the extra code we are using seems to be around supporting older kernels without all of the features.
The current implementation of
libkeyutils-sys
requires linking against the C librarylibkeyutils
. However, this seems a bit unnecessary as this library doesn't use any oflibkeyutils
advanced functionality (and it reimplements all the constants), but only needs the wrappers for the three Linux syscalls:I would propose the following design change:
libkeyutils
libc::syscall
and std::io::Error::last_os_error to implement type-safe Rust wrappers around the syscalls.unsafe
code would be limited to the lower-level crate.errno
crate could be removed as a dependancyThis changes would probably justify changing the name from
libkeyutils-sys
tokeyutils-raw
.