#bits #bit #frob #bytemuck

no-std bitfrob

A sibling crate for bytemuck, this is where forbid(unsafe_code) utilities live

6 releases

Uses new Rust 2021

0.2.3 Sep 2, 2022
0.2.2 Aug 21, 2022
0.1.1 Jul 30, 2022

#93 in No standard library

Download history 43/week @ 2022-10-07 53/week @ 2022-10-14 56/week @ 2022-10-21 33/week @ 2022-10-28 45/week @ 2022-11-04 39/week @ 2022-11-11 31/week @ 2022-11-18 41/week @ 2022-11-25 50/week @ 2022-12-02 78/week @ 2022-12-09 78/week @ 2022-12-16 76/week @ 2022-12-23 28/week @ 2022-12-30 60/week @ 2023-01-06 28/week @ 2023-01-13 84/week @ 2023-01-20

202 downloads per month
Used in 2 crates

Zlib OR Apache-2.0 OR MIT

18KB
284 lines

docs.rs Documentation

bitfrob

Helps you frob those bits


lib.rs:

A crate to help with bit manipulation of integers.

Naming Conventions

  • The bit function work on a single bit.
  • The region functions work on multiple adjacent bits.
  • The value functions are like a region but the value is automatically shifted down on read and up on write so that you can input/output normal values and the function will put it in place for you.
  • get reads a value.
  • with returns a new value.

Features

  • track_caller adds the #[track_caller] attribute on all the functions that assert stuff. Note that using the track_caller attribute can give LLVM trouble with inlining, so it's suggested that you only use this feature as necessary during debugging.

No runtime deps

Features

  • track_caller