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

core: Make heapless support optional and support multiple versions #81

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

robin-nitrokey
Copy link
Member

The DynFile::read_to_end, DynFilesystem::read and DynFilesystem::read_chunk methods use a heapless::Vec to store a flexible amount of data. This patch introduces a Vec trait that abstracts over different versions of heapless so that we can optionally support multiple heapless versions at the same time.

Fixes: #77

@robin-nitrokey
Copy link
Member Author

@sosthene-nitrokey What do you think about adding support for heapless-bytes? Would be more user-friendly and easier to maintain for users.

@sosthene-nitrokey
Copy link
Contributor

That looks like a good idea. But optional like for heapless.

@robin-nitrokey
Copy link
Member Author

Added support for heapless-bytes 0.3 and 0.4.

The DynFile::read_to_end, DynFilesystem::read and
DynFilesystem::read_chunk methods use a heapless::Vec to store a
flexible amount of data.  This patch introduces a Vec trait that
abstracts over different versions of heapless so that we can optionally
support multiple heapless versions at the same time.

Fixes: #77
Similar to the existing support for multiple heapless versions, this
patch also adds support for heapless-bytes 0.3 and 0.4.
@robin-nitrokey robin-nitrokey merged commit a1f8d9e into main Sep 16, 2024
8 checks passed
@robin-nitrokey robin-nitrokey deleted the heapless branch September 16, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core: Make heapless dependency optional
3 participants