this post was submitted on 30 Dec 2025
8 points (100.0% liked)
Rust
7653 readers
14 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Deku is a declarative binary parser. deku_string is an extension which currently provides utility wrappers for data vectors and unicode strings, which can be prefixed or fixed length. Additionally library provides support for 7-bit encoded integers from .NET.
For example, I often work with binary structures where strings are either length prefixed (with zero character in a buffer) or in fixed size buffer with a zero-ended sting inside.
There’s multiple examples with custom writer and reader functions, which work, but are less convenient to use.
Any additional ideas for utilities are welcome.