-
Couldn't load subscription status.
- Fork 13.9k
Description
Feature gate: #![feature(core_ffi_c)]
This is a tracking issue for providing the aliases for C types (c_int, c_char, etc) via core::ffi, not just via std::os::raw. The ability to interoperate with C code via FFI is not limited to crates using std; this allows using these types without std.
Public API
// core::ffi
pub type c_char = ...;
pub type c_short = ...;
pub type c_ushort = ...;
pub type c_int = ...;
pub type c_uint = ...;
// ...The existing types in std::os::raw will become type aliases for the ones in core::ffi. This will use type aliases rather than re-exports, to allow the std types to remain stable while the core types are unstable.
This also moves the currently unstable NonZero variants and c_size_t/c_ssize_t/c_ptrdiff_t types to core::ffi, while leaving them unstable.
Steps / History
- Implementation: Provide C FFI types via core::ffi, not just in std #94503
- Final comment period (FCP)
- Stabilization PR