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

!performance@programming.dev

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
 

This is a small release to support Deku 0.20.0 release. The only incompatibility was an introduced descriptive-errors feature which is explicitly propagated at the moment.

The crate started as support decoding and encoding fixed and variable length unicode strings, but quite soon become more than this.

While there’s some ideas to implement, new ideas and improvements are always welcome.

you are viewing a single comment's thread
view the rest of the comments
[–] blazebra@programming.dev 3 points 1 week ago

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.