hadronized / luminance-rs

Type-safe, type-level and stateless Rust graphics framework
https://phaazon.github.io/learn-luminance/
Other
1.09k stars 59 forks source link

Add wrapper_attr attribute to #derive(Semantics) #607

Open ColonelThirtyTwo opened 1 year ago

ColonelThirtyTwo commented 1 year ago

Allows adding attributes to the wrapper structs, in particular derive. For example, allows the wrappers to derive bytemuck::Pod.

Also add #[repr(transparent)] to the wrappers, since there's no reason not to and should probably have them anyway for safety.

hadronized commented 1 year ago

The whole semantics part is going to change a lot so I’m not quite sure this is something that is going to work afterwards. Let me have a look at whether we can merge it first and then I will start the refactoring, or the other way around.