rust-embedded / rust-embedded/heapless
Serialize Vec<u8> as bytes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 253
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
Some serialization formats distinguish between arrays of bytes and byte strings.
One approach is to defer to serde-bytes, https://github.com/serde-rs/bytes/pull/18.
An alternative is that heapless has a specialized Vec<u8> wrapper type, with its own ser/de routines, but delegating everything else to Vec. This is probably preferable, to have all the traits available.
Thoughts? I could give this a try if there is support to include such a Bytes type here (I have a private/non-polished POC that does the obvious thing). Maybe there are other properties it could have over a generic Vec, such as Ord or (maybe?) more efficient extend_from_slice, and more natural target of String::into_bytes.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the linked serde-bytes proposal and the heapless Vec wrapper approach described in the issue. Determine whether a Bytes type is in scope, which serialization traits and formats it must support, and what tests would establish the intended behavior; no file or test entry point is named.
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
- Needs clarification
- Newbie friendliness
- 25/100