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

Add support for cast using bytemuck crate #541

Merged
merged 2 commits into from
Mar 7, 2022
Merged

Add support for cast using bytemuck crate #541

merged 2 commits into from
Mar 7, 2022

Conversation

maku693
Copy link
Contributor

@maku693 maku693 commented Feb 26, 2022

Added support for bytemuck crate.

I also applied cargo fmt, but I think it is out of scope, so I can remove that changes if you mind.

@Rua
Copy link

Rua commented Feb 26, 2022

Good idea! I just came looking for this, and you read my mind.

@kvark
Copy link
Collaborator

kvark commented Mar 4, 2022

Thank you for the PR!
Does that match what any other libraries are doing?

@maku693
Copy link
Contributor Author

maku693 commented Mar 4, 2022

I think yes.

bytemuck offers derive macro for that purpose, but it cannot be used for generic structs.

glam does this too (but not using macros).

@Rua
Copy link

Rua commented Mar 4, 2022

Nalgebra does as well.

@kvark kvark merged commit 2e76e82 into rustgd:master Mar 7, 2022
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.

3 participants