Skip to content

Conversation

m4c-ro
Copy link

@m4c-ro m4c-ro commented Aug 1, 2025

Adds support for heapless Vec behind a non-default feature flag.

My use case involves encoding a variable but bounded sequence of bytes, which aligns well with the heapless::Vec type. This approach also avoids heap allocation during serialization & deserialization.

Heapless has a serde feature, but it's implementing using visit_seq rather than visit_bytes or visit_byte_buf, so it suffers from the issue this crate is designed to address. I wasn't sure, but decided to try implementing this here rather than in heapless.

I noticed #4 mentioned a similar requirement.

I'm happy to refine this if needed. Let me know if there are any concerns about the approach or the implementation.

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

Successfully merging this pull request may close these issues.

1 participant