#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

#248 in Rust patterns

Download history 46/week @ 2024-07-18 75/week @ 2024-07-25 65/week @ 2024-08-01 46/week @ 2024-08-08 61/week @ 2024-08-15 221/week @ 2024-08-22 166/week @ 2024-08-29 166/week @ 2024-09-05 259/week @ 2024-09-12 95/week @ 2024-09-19 69/week @ 2024-09-26 48/week @ 2024-10-03 46/week @ 2024-10-10 38/week @ 2024-10-17 27/week @ 2024-10-24 39/week @ 2024-10-31

161 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

~290–750KB
~17K SLoC