[package] name = "commonware-codec" edition.workspace = true rust-version.workspace = true publish = true version.workspace = true license.workspace = true description = "Serialize structured data." readme = "README.md" homepage.workspace = true repository = "https://github.com/commonwarexyz/monorepo/tree/main/codec" documentation = "https://docs.rs/commonware-codec" [lints] workspace = true [features] default = [ "std" ] std = [ "bytes/std", "commonware-macros/std", "rand_chacha?/std", "ruint/std", "thiserror/std", ] arbitrary = [ "dep:arbitrary", "dep:commonware-conformance", "dep:rand_chacha", "dep:rand_core", "ruint/arbitrary", "std", ] fuzz = [ "arbitrary/derive", "dep:arbitrary" ] [dependencies] arbitrary = { workspace = true, optional = true } bytes.workspace = true cfg-if.workspace = true commonware-codec-macros.workspace = true commonware-conformance = { workspace = true, optional = true } commonware-macros.workspace = true paste.workspace = true rand_chacha = { workspace = true, optional = true } rand_core = { workspace = true, optional = true } ruint.workspace = true thiserror.workspace = true [dev-dependencies] arbitrary = { workspace = true, features = ["derive"] } commonware-allocator = { workspace = true, features = ["mimalloc"] } commonware-invariants.workspace = true criterion.workspace = true rand = { workspace = true, features = ["std", "std_rng"] } [lib] bench = false [[bench]] name = "codec" harness = false path = "src/benches/bench.rs" required-features = [ "std" ]