[package]
edition = "2021"
rust-version = "1.60"
name = "cowbytes"
version = "0.1.2"
authors = ["Lachlan Deakin <ljdgit@gmail.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Like Cow<[u8]>, but with reference-counted bytes::Bytes instead of an owned Vec<u8>"
documentation = "https://docs.rs/cowbytes"
readme = "README.md"
keywords = [
"bytes",
"cow",
"zero-copy",
"buffer",
"no_std",
]
categories = [
"data-structures",
"memory-management",
"no-std",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/LDeakin/cowbytes"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
default = ["std"]
serde = [
"dep:serde",
"serde/alloc",
]
std = [
"bytes/std",
"serde?/std",
]
[lib]
name = "cowbytes"
path = "src/lib.rs"
[[test]]
name = "buf"
path = "tests/buf.rs"
[[test]]
name = "cmp"
path = "tests/cmp.rs"
[[test]]
name = "convert"
path = "tests/convert.rs"
[[test]]
name = "cow_bytes"
path = "tests/cow_bytes.rs"
[[test]]
name = "iter"
path = "tests/iter.rs"
[[test]]
name = "serde"
path = "tests/serde.rs"
[dependencies.bytes]
version = "1.7.0"
default-features = false
[dependencies.serde]
version = "1.0"
optional = true
default-features = false
[dev-dependencies.serde_json]
version = "1.0"
[lints.clippy]
missing_errors_doc = "warn"
missing_panics_doc = "warn"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_docs = "warn"
unreachable_pub = "warn"
unsafe_op_in_unsafe_fn = "warn"