The slicefields Rust crate is a procedural macro (essentially an extension to the language) which allows for structs
to be partitioned up into bit slices which can be used as if they were members of said struct (minus some syntactical differences).
This is particularly useful in kernel programming because a lot of data types contain both pieces of data and flags, e.g. interrupt descriptors.
One goal of slicefield was to generate code that would compile to as efficient object code as possible, even with compiler optimizations
turned off, which led to me using the faboulus Godbolt compiler explorer quite a lot.
- Rust
- x86 Assembly
- Parsing Token Trees