Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMove std::os::raw into core #52839
Conversation
rust-highfive
assigned
aidanhs
Jul 30, 2018
This comment has been minimized.
This comment has been minimized.
|
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Jul 30, 2018
This comment has been minimized.
This comment has been minimized.
|
Core is intended to be platform-independent, so I don't think doing this is a good idea per current policies. |
This comment has been minimized.
This comment has been minimized.
|
Is this platform-dependent? There are no |
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
joshlf
force-pushed the
joshlf:raw-core
branch
from
4f1b588
to
2b483e7
Jul 30, 2018
This comment has been minimized.
This comment has been minimized.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This comment has been minimized.
This comment has been minimized.
|
This was discussed as part of RFC 1783 which was not accepted. |
kennytm
added
the
T-libs
label
Jul 30, 2018
This comment has been minimized.
This comment has been minimized.
There's a huge See also #46736. |
This comment has been minimized.
This comment has been minimized.
|
Previously:
I’m personally not very convinced by the arguments against this move. |
This comment has been minimized.
This comment has been minimized.
|
This would be the first use of #[cfg(any(all(target_os = "linux", any(target_arch = "aarch64",
target_arch = "arm",
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "s390x")),
all(target_os = "android", any(target_arch = "aarch64",
target_arch = "arm")),
all(target_os = "l4re", target_arch = "x86_64"),
all(target_os = "openbsd", target_arch = "aarch64"),
all(target_os = "fuchsia", target_arch = "aarch64")))]
pub type c_char = u8;
#[cfg(any(target_pointer_width = "32", windows))]
pub type c_long = i32; |
This comment has been minimized.
This comment has been minimized.
|
Ah, I didn't realize this had already been litigated so much. I'm still in favor of the move, but I'm not going to waste more of folks' cycles on an issue that has been litigated to death. |
joshlf
closed this
Jul 31, 2018
This comment has been minimized.
This comment has been minimized.
|
New RFC to propose doing this for |
joshlf commentedJul 30, 2018
Move the types in
std::os::rawintocore::os::raw, and re-export them fromstd::os::raw.This allows these types to be used in a no-std environment without having to use
libc, and also addresses rust-lang/rust-bindgen#1015.There's a discussion about this on the internals forum here.