rust-packed-struct 0.3.0 Binary-level structure packing and unpacking generator

This package provides bit-level packing an unpacking of structs. Tkhe library provides a meta-programming approach, using attributes to define fields and how they should be packed. The resulting trait implementations provide safe packing, unpacking and runtime debugging formatters with per-field documentation generated for each structure.

  • Plain Rust structures, decorated with attributes

  • MSB or LSB integers of user-defined bit widths

  • Primitive enum code generation helper

  • MSB0 or LSB0 bit positioning

  • Documents the field's packing table

  • Runtime packing visualization

  • Nested packed types

  • Arrays of packed structures as fields

  • Reserved fields, their bits are always 0 or 1