-
Notifications
You must be signed in to change notification settings - Fork 14k
Description
On Linux on ARMv7, c_char is u8. On Linux on x86_64, c_char is `i8. See the XPCOM bug that caused me to find out.
Does importing this design flaw of the C language into Rust solve any real problem, considering that Rust runs only on two's-complement systems and the FFI ABI for u8 and i8 is the same?
If not, I suggest making the signedness of c_char in Rust the same across platforms. Ideally, it would be u8, but since x86_64 is the most common platform that developers use and it's i8 there, it might not be feasible to use u8 without breaking existing code. (Theoretically, changing the signedness for ARMv7 is a breaking change, but it practice, it isn't a breaking change for code that already compiles on x86_64 also, which is most crates except maybe some embedded specialty crates.)