wire-codec 1.2.0

Binary frame codec and protocol codec toolkit. Length-prefixed, varint-prefixed, delimiter-based, checksummed, and custom framing strategies. Built-in varint, zigzag, bitfield, packed struct, CRC, and COBS encoding. Allocation-free core, no_std, runtime-agnostic, with optional tokio-util and futures codec adapters.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.85"
name = "wire-codec"
version = "1.2.0"
authors = ["James Gober <me@jamesgober.com>"]
build = false
exclude = ["fuzz/"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Binary frame codec and protocol codec toolkit. Length-prefixed, varint-prefixed, delimiter-based, checksummed, and custom framing strategies. Built-in varint, zigzag, bitfield, packed struct, CRC, and COBS encoding. Allocation-free core, no_std, runtime-agnostic, with optional tokio-util and futures codec adapters."
homepage = "https://github.com/jamesgober/wire-codec"
documentation = "https://docs.rs/wire-codec"
readme = "README.md"
keywords = [
    "codec",
    "framing",
    "varint",
    "no-std",
    "protocol",
]
categories = [
    "encoding",
    "network-programming",
    "no-std",
    "embedded",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/jamesgober/wire-codec"

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
asynchronous-codec = [
    "bytes",
    "std",
    "dep:asynchronous-codec",
]
bytes = ["dep:bytes"]
default = ["std"]
memchr = ["dep:memchr"]
std = [
    "memchr?/std",
    "bytes?/std",
]
tokio-util = [
    "bytes",
    "std",
    "dep:tokio-util",
]

[lib]
name = "wire_codec"
path = "src/lib.rs"

[[example]]
name = "length_prefixed_echo"
path = "examples/length_prefixed_echo.rs"

[[example]]
name = "newline_protocol"
path = "examples/newline_protocol.rs"

[[example]]
name = "varint_record"
path = "examples/varint_record.rs"

[[test]]
name = "adapters"
path = "tests/adapters.rs"

[[test]]
name = "fuzz_harness"
path = "tests/fuzz_harness.rs"

[[test]]
name = "integration_protocols"
path = "tests/integration_protocols.rs"

[[test]]
name = "packed"
path = "tests/packed.rs"

[[test]]
name = "prop_bitfield"
path = "tests/prop_bitfield.rs"

[[test]]
name = "prop_framing"
path = "tests/prop_framing.rs"

[[test]]
name = "prop_varint"
path = "tests/prop_varint.rs"

[[test]]
name = "prop_zigzag"
path = "tests/prop_zigzag.rs"

[[test]]
name = "smoke"
path = "tests/smoke.rs"

[[bench]]
name = "codec"
path = "benches/codec.rs"
harness = false

[[bench]]
name = "framing"
path = "benches/framing.rs"
harness = false

[dependencies.asynchronous-codec]
version = "0.7"
optional = true

[dependencies.bytes]
version = "1.5"
optional = true
default-features = false

[dependencies.memchr]
version = "2.7"
optional = true
default-features = false

[dependencies.tokio-util]
version = "0.7.10"
features = ["codec"]
optional = true
default-features = false

[dev-dependencies.proptest]
version = "1.11"
features = ["std"]
default-features = false

[profile.bench]
opt-level = 3
lto = "fat"
codegen-units = 1
debug = 2

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"