sharksforarms / deku

Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Apache License 2.0
1.14k stars 55 forks source link

Support no_std environments without alloc #248

Closed jhbruhn closed 2 years ago

jhbruhn commented 2 years ago

How fundamental is the use of alloc in this library? It would be nice to be able to use (a subset) of this crate on no_std targets which don't have a global allocator. The parsing and serialization alone should be possible without that if I understand this crate correctly.

sharksforarms commented 2 years ago

Pretty fundamental. I added the feature to make it extensible in the future. The BitVec type is used to serialize the final byte output, so probably not during writing. It might be possible to do some reading. I've never actually tried/had a use case for a platform without an allocator. I would recommend giving it a try and see'ing if it works for you.

sharksforarms commented 2 years ago

Closing for now

ImUrX commented 1 year ago

why was this closed?

sharksforarms commented 1 year ago

why was this closed?

See my previous reply here: https://github.com/sharksforarms/deku/issues/248#issuecomment-1049863195

alloc is pretty fundamental to the crate as it stands. If you have any proposals, questions or input, please open an issue. Thanks!

ImUrX commented 1 year ago

yeah I understood the reason why alloc is used, I dont understand why this issue is closed though.

If you don't plan to add this feature you can close it as not planned, or just leave it open if you are open to listening to ideas.

sharksforarms commented 1 year ago

If you don't plan to add this feature you can close it as not planned, or just leave it open if you are open to listening to ideas.

See my previous reply.

If you have any proposals, questions or input, please open an issue.