Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Uuid #[repr(transparent)] #463

Closed
kinggoesgaming opened this issue Mar 7, 2020 · 1 comment · Fixed by #468
Closed

make Uuid #[repr(transparent)] #463

kinggoesgaming opened this issue Mar 7, 2020 · 1 comment · Fixed by #468

Comments

@kinggoesgaming
Copy link
Member

Based on #461 by @DianaNites


The crate supports no_std, but the Uuid type isn't FFI safe/repr(transparent)? There doesn't seem to be any reason for it not to be. That attribute is stable since 1.28.0, which is below the crates MSRV.

@KodrAus
Copy link
Member

KodrAus commented Mar 11, 2020

Uuid isn't currently #[repr(transparent)] so that it doesn't leak its internal layout. Arrays are also a bit strange for FFI, so folks that need to use a #[repr(transparent)] Uuid in a FFI would need to pass it as &Uuid. This isn't necessarily a reason not to add a #[repr(transparent)] though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants