rust-embedded / rust-embedded/heapless

Alignment of internal arrays

Open
#380 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement question
Dominant language
Rust
Stars
2k
Forks
253
Avg merge
1d 2h
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing heapless's internal buffer representations and the alignment approach shown in embedded-fatfs's src/device.rs using elain. Define the API and supported data structures for constraining internal buffer alignment, then validate the design against peripheral alignment requirements and document the resulting behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.