[package]
name = "sacp-cbor"
version = "0.10.2"
edition = "2021"
rust-version = "1.75"
license = "MIT"
description = "SACP-CBOR/1: strict deterministic CBOR validation and canonical encoding (hot-path optimized, no_std-capable)."
readme = "README.md"
keywords = ["cbor", "canonical", "deterministic", "no_std", "sacp"]
categories = ["encoding", "no-std"]

repository = "https://github.com/Synext-Solution/sacp-cbor"

[workspace]
members = ["sacp-cbor-derive"]

[features]
# Full-featured default for typical server deployments.
default = ["std", "alloc", "sha2"]

# Enable std integration (implements std::error::Error and enables test/bench friendliness).
std = []

# Enable allocation-backed APIs (owned AST, canonical encoder, owned canonical bytes).
alloc = []

# Enable SHA-256 hashing helpers for canonical CBOR bytes.
sha2 = ["dep:sha2"]

# Enable serde-based conversions to/from canonical CBOR.
serde = ["dep:serde", "alloc", "std"]

# Enable SIMD-accelerated UTF-8 validation where supported.
simdutf8 = ["dep:simdutf8"]

# Allow unchecked UTF-8 for canonical-trusted inputs (unsafe).
unsafe = []

[dependencies]
sha2 = { version = "0.10", default-features = false, optional = true }
serde = { version = "1", default-features = false, features = ["alloc", "derive", "std"], optional = true }
sacp-cbor-derive = { path = "sacp-cbor-derive", version = "0.10.2" }
simdutf8 = { version = "0.1", default-features = false, optional = true }

[dev-dependencies]
proptest = "1"

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