#bit-fields #structs #bitfields #compile-time #proc-macro #declare #accessor

proc-bitfield

A crate to expressively declare bitfield-like structs

12 unstable releases (5 breaking)

0.5.0 Aug 28, 2024
0.4.0 Apr 5, 2024
0.3.1 Jan 22, 2024
0.3.0 Jul 30, 2023
0.1.1 Jul 30, 2022

#331 in Rust patterns

Download history 58/week @ 2024-08-17 275/week @ 2024-08-24 117/week @ 2024-08-31 178/week @ 2024-09-07 251/week @ 2024-09-14 112/week @ 2024-09-21 50/week @ 2024-09-28 43/week @ 2024-10-05 45/week @ 2024-10-12 34/week @ 2024-10-19 43/week @ 2024-10-26 67/week @ 2024-11-02 86/week @ 2024-11-09 53/week @ 2024-11-16 60/week @ 2024-11-23 30/week @ 2024-11-30

243 downloads per month
Used in 7 crates (5 directly)

MIT/Apache

59KB
1K SLoC

proc-bitfield

crates.io docs.rs

A Rust crate to expressively declare bitfield-like structs, automatically ensuring their correctness at compile time and declaring accessors.

API and syntax docs

Usage examples

License

This project is licensed under a dual MIT/Apache 2.0 license.

Dependencies

~270–720KB
~16K SLoC