-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
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
petrochenkov, zetanumbers, madsmtm, U007D and rgwood
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.