-
Notifications
You must be signed in to change notification settings - Fork 187
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
Consistent c_char
#1261
Comments
We can't use I've just now fixed several more issues on the release 1.0 checklist, and deferred a few more, getting the release closer. I'll continue to work on implementing more of those and marking the more time-consuming ones as deferred so that we can release 1.0 sooner rather than later. |
By "we" I assume you're talking about I'll close this for now as it'll clearly get fixed once the release is cut. |
At the moment, there are three possible configurations for rustix on linux:
libc
.linux-raw-sys
with the "std" feature.linux-raw-sys
without the "std" feature.It's not currently feasible to support all three configurations, at least when the "std" feature in
rustix
is enabled.rustix::ffi::c_char
will always be the same ascore::ffi::c_char
(given that the "std" feature is enabled in rustix).linux_raw_sys::ctypes::c_char
will bei8
oru8
depending on the platform and whether or not "std" is enabled.If I use
linux_raw_sys::ctypes::c_char
in my project (xattr
) when, e.g., callingrustix::fs::listxattr
, I'm able to support thelinux-raw-sys
backend both with and without the "linux-raw-sys/std" feature, but thelibc
backend won't work as expected. If, instead, I userustix::ffi::c_char
, I can support thelibc
andlinux-raw-sys
backends when the "linux-raw-sys/std" feature is enabled (explicitly, see #945 because it's not enabled by default) but thelinux-raw-sys
backend won't work without said feature.So ether:
rustix
needs to re-export the correctc_char
. E.g.,rustix::ffi::c_char
needs to belinux_raw_sys::ctypes::c_char
when thelinux_raw_sys
backend is in use.linux_raw_sys
needs to usecore::ffi::c_char
.Ideally the second option for maximum compatibility.
The text was updated successfully, but these errors were encountered: