[package]
name = "facet-postcard"
version = "0.44.7"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Postcard binary format for facet with Tier-0 and Tier-2 JIT deserialization"
keywords = ["postcard", "binary", "serialization", "facet", "jit"]
categories = ["encoding", "parsing"]
homepage = "https://facet.rs"

[package.metadata]

[package.metadata."docs.rs"]
rustdoc-args = ["--html-in-header", "arborium-header.html"]

[dependencies]
facet-core = { workspace = true }
facet-format = { path = "../facet-format", version = "0.44.7" }
facet-path = { workspace = true, features = ["alloc"] }
facet-reflect = { workspace = true }
facet-value = { workspace = true }
tracing = { workspace = true }

# Axum integration (optional)
axum-core = { version = "0.5", default-features = false, optional = true }
http = { workspace = true, optional = true }
http-body-util = { version = "0.1", default-features = false, optional = true }

# Optional type support
bytestring = { workspace = true, optional = true }
camino = { workspace = true, optional = true }
chrono = { workspace = true, optional = true }
compact_str = { workspace = true, optional = true }
jiff = { workspace = true, optional = true }
ordered-float = { version = "5.0.0", optional = true, default-features = false }
smartstring = { workspace = true, optional = true }
time = { workspace = true, optional = true }
ulid = { workspace = true, optional = true }
uuid = { workspace = true, optional = true }

[dev-dependencies]
bytes = { workspace = true }
chrono = { workspace = true, features = ["clock"] }
divan = { workspace = true }
facet = { workspace = true, features = ["std", "all-impls", "doc"] }
facet-format = { path = "../facet-format", features = ["jit"] }
facet-json = { path = "../facet-json", version = "0.44.7" }
facet-json-classics = { path = "../facet-json-classics", version = "0.44.3" }
facet-testhelpers = { workspace = true }
facet-value = { path = "../facet-value" }
serde_json = { workspace = true }
jiff = { workspace = true }
ordered-float = { version = "5.0.0", default-features = false }
postcard = { version = "1", features = ["alloc"] }
serde = { workspace = true, features = ["rc", "derive", "std"] }
serde_bytes = "0.11"
time = { workspace = true }
ulid = { workspace = true }
uuid = { workspace = true, features = ["v4"] }

[[bench]]
name = "classics"
harness = false

[[bench]]
name = "vs_postcard"
harness = false

[features]
default = ["std"]
std = ["alloc", "facet-core/std", "facet-reflect/std", "facet-path/std"]
alloc = ["facet-core/alloc", "facet-reflect/alloc", "facet-path/alloc"]
jit = ["facet-format/jit"]
ci = ["jit"] # CI feature enables JIT tests

# Axum HTTP integration
axum = ["std", "dep:axum-core", "dep:http", "dep:http-body-util"]

# External type support
net = ["facet-format/net", "facet-core/net"]
bytes = ["facet-core/bytes"]
bytestring = ["facet-core/bytestring", "dep:bytestring"]
camino = ["facet-core/camino", "dep:camino"]
compact_str = ["facet-core/compact_str", "dep:compact_str"]
smartstring = ["facet-core/smartstring", "dep:smartstring"]
uuid = ["facet-core/uuid", "dep:uuid"]
ulid = ["facet-core/ulid", "dep:ulid"]
ordered-float = ["facet-core/ordered-float", "dep:ordered-float"]
jiff02 = ["facet-core/jiff02", "dep:jiff"]
time = ["facet-core/time", "dep:time"]
chrono = ["facet-core/chrono", "dep:chrono"]

[package.metadata.cargo-shear]
ignored = ["facet-path"]

[lints]
workspace = true
