[package]
name = "facet-postcard"
version.workspace = true
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 = { path = "../facet-core", version = "0.41.0", default-features = false }
facet-format = { path = "../facet-format", version = "0.41.0" }
facet-path = { path = "../facet-path", version = "0.41.0", default-features = false, features = ["alloc"] }
facet-reflect = { path = "../facet-reflect", version = "0.41.0", default-features = false }
miette = { workspace = true, optional = 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
bytes = { workspace = true, optional = true }
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 }

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

[features]
default = ["std", "pretty-errors"]
std = ["alloc", "facet-core/std", "facet-reflect/std", "facet-path/std"]
alloc = ["facet-core/alloc", "facet-reflect/alloc", "facet-path/alloc"]
pretty-errors = ["facet-path/pretty", "facet-reflect/miette", "dep:miette"]
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-core/net"]
bytes = ["facet-core/bytes", "dep: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"]
