bitsandbytes 0.3.2

An owned, bit-aware binary codec: fast bit/byte field types and the unified #[bin] macro.
Documentation
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

Entries below `0.1.0` are generated from Conventional Commits by release-plz.

## [0.3.2]https://github.com/RawSocketLabs/rsl/compare/bitsandbytes-v0.3.1...bitsandbytes-v0.3.2 - 2026-07-24

Headline (in the re-exported `bitsandbytes-macros` 0.3.2): every generated
accessor is now a `const fn`, and generated bitfield/bitflags structs are
`#[repr(transparent)]` over their backing integer. Upgrading from 0.3.1: a
hand-written `Bits` field type now needs `bnb::impl_bits!` (see the `Bits`
docs), a `#[view]` closure calling non-`const` helpers needs `dynamic` (or
`const` helpers), and a primitive `type` alias as a field type must become
the bare primitive name.

### Added

- *(bnb)* add impl_bits! — one-definition Bits impls for custom field types
- *(bnb)* add the inherent const conversion pair to UInt

### Other

- *(bnb)* cover every raw-type resolution rule and codegen arm of #[view]
- *(bnb)* record the stopgap status of the const dispatch
- *(bnb)* pin the alias failure mode, the view const assertion, impl_bits!
- *(bnb)* record the const-dispatch and repr(transparent) decisions
- *(bnb)* prove the generated accessors in const contexts

## [0.3.1]https://github.com/RawSocketLabs/rsl/compare/bitsandbytes-v0.3.0...bitsandbytes-v0.3.1 - 2026-07-23

### Added

- *(bnb)* add contextual #[view] fields to #[bitfield]
- *(bnb)* add read-side #[br(calc = <expr>)]

## [0.3.0]https://github.com/RawSocketLabs/rsl/compare/bitsandbytes-v0.2.1...bitsandbytes-v0.3.0 - 2026-07-06

### Fixed

- *(bitstream)* honor bit order in StreamBitReader ([#21]https://github.com/RawSocketLabs/rsl/pull/21)

### Other

- *(bnb)* add the migration guide + a whole-message perf baseline ([#31]https://github.com/RawSocketLabs/rsl/pull/31)
- *(bnb)* polish the guide + macro reference for 1.0 ([#30]https://github.com/RawSocketLabs/rsl/pull/30)
- *(bnb)* [**breaking**] seal Source/Sink/SeekSource/BitAmount ([#27]https://github.com/RawSocketLabs/rsl/pull/27)
- *(bnb)* [**breaking**] harden the public surface for the freeze ([#26]https://github.com/RawSocketLabs/rsl/pull/26)
- *(bnb)* [**breaking**] pre-freeze naming fixes (Error, codec, raw, with_cap) ([#25]https://github.com/RawSocketLabs/rsl/pull/25)
- *(bnb)* [**breaking**] unify the byte/bit-order vocabulary across all macros ([#23]https://github.com/RawSocketLabs/rsl/pull/23)
- *(bnb)* [**breaking**] cut the carried encode_mode mechanism ([#22]https://github.com/RawSocketLabs/rsl/pull/22)

## [0.2.1]https://github.com/RawSocketLabs/rsl/compare/bitsandbytes-v0.2.0...bitsandbytes-v0.2.1 - 2026-07-05

### Other

- update Cargo.toml dependencies

## [0.2.0]https://github.com/RawSocketLabs/bitsandbytes/compare/v0.1.0...v0.2.0 - 2026-06-22

### Added

- *(bin)* re-runnable validate() / is_valid() methods ([#21]https://github.com/RawSocketLabs/bitsandbytes/pull/21)
- *(bin)* [**breaking**] carry encode mode on the value; encode(w) follows it ([#20]https://github.com/RawSocketLabs/bitsandbytes/pull/20)
- *(bin)* canonical helpers — to_canonical / canonical_diff / is_canonical ([#16]https://github.com/RawSocketLabs/bitsandbytes/pull/16)
- *(bitfield)* custom Debug that decomposes the logical fields ([#15]https://github.com/RawSocketLabs/bitsandbytes/pull/15)

### Other

- *(examples)* add framed — bytes-feature framing + streaming ([#24]https://github.com/RawSocketLabs/bitsandbytes/pull/24)
- *(bin)* [**breaking**] cut inherent encode_into / canonical_encode_into ([#23]https://github.com/RawSocketLabs/bitsandbytes/pull/23)
- align design/roadmap/guide with the encode/validate/construct model ([#22]https://github.com/RawSocketLabs/bitsandbytes/pull/22)
- clarify the verbatim vs canonical encode model ([#19]https://github.com/RawSocketLabs/bitsandbytes/pull/19)
- *(examples)* add telemetry — synthetic stacking showcase ([#17]https://github.com/RawSocketLabs/bitsandbytes/pull/17)
- [**breaking**] encode(w, mode: EncodeMode) — fold canonical into BitEncode ([#18]https://github.com/RawSocketLabs/bitsandbytes/pull/18)
- *(examples)* add ipv4 — real IPv4 header parser ([#12]https://github.com/RawSocketLabs/bitsandbytes/pull/12)
- *(roadmap)* capture encode-model + #[default] open decisions ([#13]https://github.com/RawSocketLabs/bitsandbytes/pull/13)
- [**breaking**] split encode into verbatim (to_bytes) + canonical (to_canonical_bytes) ([#14]https://github.com/RawSocketLabs/bitsandbytes/pull/14)
- reorganize repo layout, declutter the root ([#11]https://github.com/RawSocketLabs/bitsandbytes/pull/11)
- add CONTRIBUTING.md ([#10]https://github.com/RawSocketLabs/bitsandbytes/pull/10)
- add SECURITY.md (threat model + dual-use scope + reporting) ([#9]https://github.com/RawSocketLabs/bitsandbytes/pull/9)
- *(bnb)* boundary stress for hostile count + the endian×bit-order matrix ([#8]https://github.com/RawSocketLabs/bitsandbytes/pull/8)
- *(semver-checks)* block SemVer breakage vs the last release tag ([#7]https://github.com/RawSocketLabs/bitsandbytes/pull/7)
- *(public-api)* add cargo-public-api snapshot + drift gate ([#6]https://github.com/RawSocketLabs/bitsandbytes/pull/6)
- *(lints)* forbid unsafe_code workspace-wide (zero-unsafe guarantee) ([#5]https://github.com/RawSocketLabs/bitsandbytes/pull/5)
- *(bnb)* add cargo-fuzz target for the decode path ([#4]https://github.com/RawSocketLabs/bitsandbytes/pull/4)
- *(bnb-macros)* rename codec source/sink params to __bnb_r/__bnb_w ([#1]https://github.com/RawSocketLabs/bitsandbytes/pull/1)

## [0.1.0] - 2026-06-19

Initial baseline of the `bitsandbytes` runtime crate.