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

proc-bitfield

A crate to expressively declare bitfield-like structs

14 unstable releases (5 breaking)

new 0.5.2 Dec 26, 2024
0.5.0 Aug 28, 2024
0.4.0 Apr 5, 2024
0.3.1 Jan 22, 2024
0.1.1 Jul 30, 2022

#291 in Rust patterns

Download history 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 40/week @ 2024-11-30 117/week @ 2024-12-07 72/week @ 2024-12-14 157/week @ 2024-12-21

395 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

~255–700KB
~16K SLoC