What it does
Binary frame codec and protocol codec toolkit. Length-prefixed, delimiter-based, and custom framing strategies. Built-in varint, zigzag, bitfield, and packed struct encoding. Runtime-agnostic foundation under network-protocol crates.
Quick start
[]
= "0.5"
use WriteBuf;
use ;
let framer = new;
let mut out = ;
let mut buf = new;
framer.write_frame.unwrap;
let n = buf.position;
let frame = framer.next_frame.unwrap.unwrap;
assert_eq!;
See docs/API.md for the full API reference. Runnable
demonstrations live under examples/:
Benchmarks are dependency-free manual harnesses:
Standards
- REPS governs every decision. See REPS.md.
- MSRV: Rust 1.75.
- Edition: 2024.
- Cross-platform: Linux, macOS, Windows.
License
Dual-licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.