6 releases

0.1.5 Feb 16, 2024
0.1.4 Nov 5, 2023
0.1.3 Oct 21, 2023
0.1.1 Sep 21, 2023

#722 in Rust patterns

Download history 42/week @ 2024-07-23 42/week @ 2024-07-30 34/week @ 2024-08-06 342/week @ 2024-08-13 962/week @ 2024-08-20 2039/week @ 2024-08-27 2446/week @ 2024-09-03 1536/week @ 2024-09-10 1962/week @ 2024-09-17 1596/week @ 2024-09-24 749/week @ 2024-10-01 1132/week @ 2024-10-08 936/week @ 2024-10-15 1040/week @ 2024-10-22 1467/week @ 2024-10-29 1321/week @ 2024-11-05

4,843 downloads per month
Used in 5 crates (4 directly)

MIT/Apache

16KB
329 lines

macro-bits

A collection of declarative macros, which makes working with bitfields and similar things trivial.

philosophy

Every macro which makes your live simpler should have zero performance penalty in a sense, that even though they might look complex and intimidating. They actually just evaluate, to exactly the same code you'd write by hand and LLVM can optimize them to dust.

motivation

Frame formats, like the one used by IEEE802.11, use a metric crap ton(definetly an SI unit) of bitfields and, since I appear to be addicted to writing binary parsers, have developed it to takeover some repetitive tasks.

Dependencies

~11KB