-
Notifications
You must be signed in to change notification settings - Fork 61
Are raw pointers to sized types usable in C FFI ? #99
Copy link
Copy link
Closed
Labels
A-ffiTopic: Related to FFITopic: Related to FFIA-layoutTopic: Related to data structure layout (`#[repr]`)Topic: Related to data structure layout (`#[repr]`)
Description
AFAICT we don't mention this explicitly anywhere.
https://github.com/rust-lang/unsafe-code-guidelines/blob/master/reference/src/layout/pointers.md#representation mentions that they are one word in size, but maybe we should spell out that they are layout compatible with C pointers (including alignment) to make it clear that's ok to use raw pointers in C FFI.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ffiTopic: Related to FFITopic: Related to FFIA-layoutTopic: Related to data structure layout (`#[repr]`)Topic: Related to data structure layout (`#[repr]`)
Type
Fields
Give feedbackNo fields configured for issues without a type.