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

Alignment of internal arrays #380

Open
MabezDev opened this issue Sep 29, 2023 · 2 comments
Open

Alignment of internal arrays #380

MabezDev opened this issue Sep 29, 2023 · 2 comments

Comments

@MabezDev
Copy link
Member

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.

@JohnScience
Copy link

I would love this feature too.

@JohnScience
Copy link

JohnScience commented Dec 26, 2023

@MabezDev You can take a look at my PR where I implemented AlignedVec #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants