rust-bindgen
rust-bindgen copied to clipboard
Wrap the array representation of opaque types in a #[repr(C)] struct
Fixes #2845. Wrapping the generated array in a struct ensures that it is passed in an FFI-safe way. This does assume that the calling convention for structs is only dependent on size and alignment, but that seems like an improvement on using a type whose calling convention is not considered stable at all. Padding bytes (etc.) have been excluded from this treatment.
@stevecapperarm does this resolve your issue in #2845?
r? @emilio @pvdrz