#flags #binary #boolean #packed #structs #zig #fields

binf

A crate that adds utilities for dealing with binary flags

15 releases (8 stable)

1.1.4 Oct 20, 2024
1.1.2 Jun 15, 2024
1.1.1 Feb 9, 2024
1.1.0 Dec 29, 2023
0.1.2 Dec 8, 2022

#563 in Rust patterns

MIT license

10KB
191 lines

binf, Binary Flags

This crate aims to make working with binary/bit flags easier. It also provides a macro to add similar functionality to zig's packed structs with boolean fields.

i suggest looking at tests.rs for examples


lib.rs:

binf, Binary flags

This crate aims to make working with binary/bit flags easier. It also provides a macro to add similar functionality to zig's packed structs with boolean fields.

Dependencies

~270–730KB
~17K SLoC