heapless
heapless copied to clipboard
Alignment of internal arrays
trafficstars
I often reach for heapless::Vec, but find myself having to write a custom slice wrapper due to peripheral alignment constraints have you had any thoughts about introducing a way to constrain the internal buffers alignment some how?
I found a quite nice crate called elain which I used in embedded-fatfs' block device wrapper. It allows the alignment of a field to be defined by a const generic parameter.
I would love this feature too.
@MabezDev You can take a look at my PR where I implemented AlignedVec https://github.com/rust-embedded/heapless/pull/429