[package]
edition = "2024"
rust-version = "1.95"
name = "smol-bytes"
version = "0.1.7"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance, clone-efficient byte buffers optimized for small data."
homepage = "https://github.com/al8n/smol-bytes"
readme = "README.md"
keywords = [
"bytes",
"buffer",
"inline",
"no-std",
"small",
]
categories = [
"data-structures",
"no-std",
"memory-management",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/al8n/smol-bytes"
[features]
alloc = [
"serde_core?/alloc",
"bytes",
]
arbitrary = ["dep:arbitrary"]
async-graphql = [
"dep:async-graphql",
"std",
]
borsh = ["dep:borsh"]
default = ["std"]
pyo3 = [
"dep:pyo3",
"std",
]
schemars = [
"dep:schemars",
"alloc",
]
serde = ["dep:serde_core"]
sqlx = [
"dep:sqlx",
"std",
]
std = [
"bytes/default",
"serde_core?/default",
]
wasm = [
"dep:wasm-bindgen",
"dep:js-sys",
"dep:getrandom",
"std",
]
[lib]
name = "smol_bytes"
crate-type = ["rlib"]
path = "src/lib.rs"
[[example]]
name = "quickstart"
path = "examples/quickstart.rs"
[[test]]
name = "test_buf"
path = "tests/test_buf.rs"
[[test]]
name = "test_buf_mut"
path = "tests/test_buf_mut.rs"
[[test]]
name = "test_buffer"
path = "tests/test_buffer.rs"
[[test]]
name = "test_bytes"
path = "tests/test_bytes.rs"
[[test]]
name = "test_chain"
path = "tests/test_chain.rs"
[[test]]
name = "test_compact_bytes"
path = "tests/test_compact_bytes.rs"
[[test]]
name = "test_compact_chain"
path = "tests/test_compact_chain.rs"
[[test]]
name = "test_compact_take"
path = "tests/test_compact_take.rs"
[[test]]
name = "test_const"
path = "tests/test_const.rs"
[[test]]
name = "test_debug"
path = "tests/test_debug.rs"
[[test]]
name = "test_errors"
path = "tests/test_errors.rs"
[[test]]
name = "test_iter"
path = "tests/test_iter.rs"
[[test]]
name = "test_properties"
path = "tests/test_properties.rs"
[[test]]
name = "test_serde"
path = "tests/test_serde.rs"
[[test]]
name = "test_str_ext"
path = "tests/test_str_ext.rs"
[[test]]
name = "test_take"
path = "tests/test_take.rs"
[[test]]
name = "test_trait_cmp"
path = "tests/test_trait_cmp.rs"
[[test]]
name = "test_trait_fmt"
path = "tests/test_trait_fmt.rs"
[[test]]
name = "test_utf8"
path = "tests/test_utf8.rs"
[[bench]]
name = "advance"
path = "benches/advance.rs"
harness = false
[[bench]]
name = "buffer"
path = "benches/buffer.rs"
harness = false
[[bench]]
name = "bytes_mut"
path = "benches/bytes_mut.rs"
harness = false
[[bench]]
name = "clone"
path = "benches/clone.rs"
harness = false
[[bench]]
name = "constructor"
path = "benches/constructor.rs"
harness = false
[[bench]]
name = "copy_to_bytes"
path = "benches/copy_to_bytes.rs"
harness = false
[[bench]]
name = "slice"
path = "benches/slice.rs"
harness = false
[[bench]]
name = "split_off"
path = "benches/split_off.rs"
harness = false
[[bench]]
name = "split_to"
path = "benches/split_to.rs"
harness = false
[[bench]]
name = "utf8"
path = "benches/utf8.rs"
harness = false
[dependencies.arbitrary]
version = "1"
optional = true
default-features = false
[dependencies.async-graphql]
version = "7"
optional = true
default-features = false
[dependencies.borsh]
version = "1"
optional = true
default-features = false
[dependencies.bytes]
version = "1"
optional = true
default-features = false
[dependencies.getrandom]
version = "0.4"
features = ["wasm_js"]
optional = true
default-features = false
[dependencies.js-sys]
version = "0.3"
optional = true
[dependencies.paste]
version = "0.2"
package = "pastey"
[dependencies.pyo3]
version = "0.29"
features = [
"macros",
"abi3-py311",
]
optional = true
default-features = false
[dependencies.quickcheck]
version = "1"
optional = true
default-features = false
[dependencies.schemars]
version = "1"
optional = true
default-features = false
[dependencies.serde_core]
version = "1"
optional = true
default-features = false
[dependencies.sqlx]
version = "0.9"
optional = true
default-features = false
[dependencies.wasm-bindgen]
version = "0.2"
features = ["strict-macro"]
optional = true
default-features = false
[dev-dependencies.criterion]
version = "0.8"
features = [
"html_reports",
"cargo_bench_support",
]
[dev-dependencies.faststr]
version = "0.2"
[dev-dependencies.proptest]
version = "1"
[dev-dependencies.serde_core]
version = "1"
default-features = false
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.serde_test]
version = "1"
[dev-dependencies.smol_str]
version = "0.3"
[lints.rust]
rust_2018_idioms = "warn"
single_use_lifetimes = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = [
"cfg(all_tests)",
"cfg(coverage)",
]