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

[v0.18] Use #[repr(C)] for vertex & constant structs. #3791

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

alexheretic
Copy link
Contributor

@alexheretic alexheretic commented Jan 26, 2023

Fixes issues exposed by rust 1.67 field ordering changes (rust-lang/rust#102750)

This PR adds #[repr(C)] to vertex & constant structs preventing field ordering issues.

Note: This actually still works fine even if users have manually specified #[repr(C)] themselves since declaring it multiple times works fine, e.g. this works:

#[repr(C)]
#[repr(C)]
#[repr(C)]
pub struct Vertex { ...

Resolves #3790

Could we get a new gfx crate release with this in it please? I think this will help out any old-school users of this crate.

Fixes issues with rust 1.67 field ordering.
@alexheretic
Copy link
Contributor Author

Hey @kvark i know v0.18 is ancient these days, but this fix is quite valuable for anyone still using it with rust 1.67 (like me). I think it's worth making a 0.18.3 release with this. Wdyt?

@kvark
Copy link
Member

kvark commented Feb 24, 2023

@alexheretic sure, sounds good!

@kvark
Copy link
Member

kvark commented Feb 24, 2023

Would you mind bumping the version to 0.18.3 in the PR?

@alexheretic
Copy link
Contributor Author

Would you mind bumping the version to 0.18.3 in the PR?

✔️

@kvark kvark merged commit 13d3e6d into gfx-rs:v0.18 Feb 27, 2023
@kvark
Copy link
Member

kvark commented Feb 27, 2023

Published now. Thank you for support!

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 this pull request may close these issues.

2 participants