cobs_codec_rs 1.3.0

Consistent Overhead Byte Stuffing (COBS) and COBS/R codec: no_std, zero-dependency, for zero-free framing of serial and packet byte streams.
Documentation
[package]
name = "cobs_codec_rs"
version = "1.3.0"
edition = "2024"
rust-version = "1.85"
description = "Consistent Overhead Byte Stuffing (COBS) and COBS/R codec: no_std, zero-dependency, for zero-free framing of serial and packet byte streams."
authors = ["Alexander Salas Bastidas <ajsb85@firechip.dev>"]
license = "MIT"
repository = "https://github.com/firechip/cobs_codec_rs"
homepage = "https://firechip.dev"
documentation = "https://docs.rs/cobs_codec_rs"
readme = "README.md"
keywords = ["cobs", "serial", "framing", "no-std", "embedded"]
categories = ["encoding", "embedded", "no-std"]
# The fuzz crate is a dev-only nested cargo-fuzz workspace; keep it out of the
# published crate.
exclude = ["/fuzz"]

[package.metadata.docs.rs]
# Document every feature, and load KaTeX so the overhead math renders. KaTeX is
# documentation-support JavaScript, which docs.rs permits; it does no tracking.
all-features = true
rustdoc-args = ["--html-in-header", "docs/katex-header.html"]

[dependencies]
# Both are OPTIONAL and OFF by default, so the default build stays
# zero-dependency and `no_std`. `serde` derives (de)serialization for the public
# error type; `defmt` derives its `Format` for embedded logging. `serde` is
# pulled with `default-features = false` so it keeps working in `no_std`.
serde = { version = "1", optional = true, default-features = false, features = ["derive"] }
defmt = { version = "1", optional = true }

[features]
default = ["std"]
# Enables the `*_to_vec` convenience functions and framing that allocate.
alloc = []
# Enables `std` (implies `alloc`). Reserved for future std-only conveniences.
std = ["alloc"]
# Optional ecosystem hooks; both stay off in the default build.
serde = ["dep:serde"]
defmt = ["dep:defmt"]

[dev-dependencies]
# Real Protocol Buffers, used only by the `protobuf_cobs` example. Dev-only, so
# the published crate stays dependency-free for library users.
prost = "0.14"
# Used only by `tests/derives.rs` to round-trip an error through JSON and prove
# the optional `serde` derive works.
serde_json = "1"
# Micro-benchmark harness for `benches/throughput.rs`. Dev-only, so it never
# reaches library consumers. `default-features = false` drops the heavy plotters
# and rayon defaults; `cargo_bench_support` is re-enabled because it is what lets
# the benchmark run under `cargo bench`.
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }

[[bench]]
name = "throughput"
harness = false

[lints.rust]
missing_docs = "warn"
unsafe_code = "forbid"

[lints.clippy]
all = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }