rawbin

Crates.iorawbin
lib.rsrawbin
version1.0.0
created_at2025-12-22 21:33:47.226531+00
updated_at2025-12-22 21:35:36.283982+00
descriptionMinimal, pure-Rust bincode-like serializer/deserializer used by pacm.
homepagehttps://github.com/pacmpkg/rawbin
repositoryhttps://github.com/pacmpkg/rawbin
max_upload_size
id2000291
size47,312
Jonas (builtbyjonas)

documentation

https://docs.rs/rawbin

README

rawbin

Minimal, pure-Rust bincode-like serializer/deserializer used by the pacm project. This crate provides a small, focused implementation that supports the subset of serde types required by pacm's lockfile handling.

Features

  • Pure Rust implementation (depends only on serde)
  • Two length-encoding modes: fixed-width (standard) and varint (legacy)
  • Configurable limits and trailing-bytes checks
  • Minimal bincode1::config::DefaultOptions compatibility helpers

Quick Start

Add the crate to your Cargo.toml:

[dependencies]
rawbin = "1"

Example usage (decoding):

use rawbin::config;
use rawbin::serde::decode_from_slice;

let data: &[u8] = &[]; // wire-format bytes
let cfg = config::standard().with_limit::<{16 * 1024 * 1024}>();
let (value, _read) = decode_from_slice::<YourType>(data, cfg).expect("decode");

Development

  • Build: cargo build
  • Test: cargo test
  • Run CI locally with act or use GitHub Actions

License

This project is dual-licensed under MIT OR Apache-2.0. See the LICENSE-MIT and LICENSE-APACHE files in this repository.

Contributing

Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md before contributing.

Commit count: 0

cargo fmt