iliekturtles / uom

Units of measurement -- type-safe zero-cost dimensional analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a feature for bytemuck and/or zerocopy to `Quantity`

tgross35 opened this issue · comments

I have a use case where I would like to store a Quantity in a struct that gets sent to a GPU shader, which means it needs to be (de)serializable to/from a byte slice. To make cases like this easier, could a bytemuck feature be added? This would add #[cfg_attr(feature = "bytemuck", derive(bytemuck::Zeroable, bytemuck::Pod)] to Quantity.