Closed maku693 closed 2 years ago
Good idea! I just came looking for this, and you read my mind.
Thank you for the PR! Does that match what any other libraries are doing?
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).
Nalgebra does as well.
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.