Encode: rewrite to two-pass (scan + copy_from_slice) leveraging Rust 1.93's const fn copy_from_slice for memcpy at runtime while keeping const fn encode. Sub-slice scan pattern helps LLVM eliminate bounds checks. Added zero byte fast path for all-zeros workloads. Now leads corncobs on nonzero/mixed encode. Decode: batch consecutive 0x01 codes (all-zeros data) and fill zeros via memset instead of per-byte loop. Decode zeros throughput jumps from ~1.2 GB/s to ~4.6 GB/s, now 3x faster than corncobs on that workload. Bump MSRV 1.83 → 1.93 for const copy_from_slice. Update dev-deps: cobs 0.3→0.5, criterion 0.5→0.8, rand 0.8→0.10. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
833 B
TOML
35 lines
833 B
TOML
[package]
|
|
name = "ucobs"
|
|
version = "0.2.0"
|
|
edition = "2021"
|
|
rust-version = "1.93"
|
|
license = "MIT"
|
|
description = "μCOBS — Consistent Overhead Byte Stuffing. no_std, zero-alloc, fastest, most-tested COBS implementation."
|
|
authors = ["Stephen Waits <steve@waits.net>"]
|
|
repository = "https://github.com/swaits/ucobs"
|
|
homepage = "https://github.com/swaits/ucobs"
|
|
documentation = "https://docs.rs/ucobs"
|
|
readme = "README.md"
|
|
keywords = ["cobs", "framing", "no-std", "embedded", "codec"]
|
|
categories = ["encoding", "no-std::no-alloc", "embedded"]
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[lints.rust]
|
|
unsafe_code = "forbid"
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
|
|
[dev-dependencies]
|
|
cobs = "0.5"
|
|
corncobs = "0.1"
|
|
criterion = { version = "0.8", features = ["html_reports"] }
|
|
proptest = "1"
|
|
rand = "0.10"
|
|
|
|
[[bench]]
|
|
name = "bench"
|
|
harness = false
|