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

#797 in Rust patterns

Download history 28/week @ 2024-01-01 34/week @ 2024-01-08 23/week @ 2024-01-15 113/week @ 2024-02-12 31/week @ 2024-02-19 46/week @ 2024-02-26 11/week @ 2024-03-04 13/week @ 2024-03-11 8/week @ 2024-03-18 34/week @ 2024-04-01 9/week @ 2024-04-08 20/week @ 2024-04-15

64 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