[package]
name = "facet-toml"
version = "0.50.0-rc.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "TOML serialization for facet using the new format architecture - successor to facet-toml"
keywords = ["toml", "serialization", "facet", "parsing"]
categories = ["encoding", "parsing"]
homepage = "https://facet.rs"

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

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

[dependencies]
facet-core = { workspace = true }
facet-format = { path = "../facet-format", version = "0.50.0-rc.0" }
facet-reflect = { workspace = true }
zmij = { version = "1", optional = true }
itoa = { version = "1", optional = true }

# TOML parsing
toml_parser = { version = "1.0.4", default-features = false, features = ["alloc"] }

# 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 }

[dev-dependencies]
divan = { workspace = true }
facet = { workspace = true, features = ["std", "doc", "net", "iddqd"] }
facet-format = { path = "../facet-format", features = ["net", "tracing"] }
facet-format-suite = { path = "../facet-format-suite", features = [
  "third-party",
  "net",
] }
facet-json-classics = { path = "../facet-json-classics" }
facet-value = { path = "../facet-value" }
facet-testhelpers = { workspace = true }
facet-reflect = { workspace = true, features = ["tracing"] }
libtest-mimic = "0.8.1"
indoc = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
toml = "1.0"

[features]
default = []
std = []
serialize = []
fast = ["dep:zmij", "dep:itoa"]
net = ["facet-format/net", "facet-core/net"]
tracing = ["facet-reflect/tracing", "facet-format/tracing"]
iddqd = ["facet-core/iddqd"]

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

# yoke support
yoke = ["facet-core/yoke"]

[[test]]
name = "format_suite"
harness = false

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

[lints]
workspace = true
