# =============================================================================
# HEDL WASM - crates/hedl-wasm/Cargo.toml
# Open Source (Apache 2.0) Crate Configuration
#
# Copyright (c) Dweve B.V.
# IP holder: Dweve IP B.V.
# =============================================================================

[package]
name = "hedl-wasm"
version.workspace = true
edition.workspace = true
rust-version.workspace = true

authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

description = "WebAssembly bindings for HEDL with TypeScript support"
documentation = "https://docs.rs/hedl-wasm"
readme = "README.md"

publish = true

include = [
    "Cargo.toml",
    "README.md",
    "LICENSE",
    "NOTICE",
    "CHANGELOG*",
    "src/**",
    "tests/**",
    "benches/**",
    "examples/**",
]

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

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[badges]
maintenance = { status = "actively-developed" }

[lints]
workspace = true

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
hedl-core = { workspace = true }
hedl-c14n = { workspace = true }
hedl-lint = { workspace = true }
wasm-bindgen = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
serde-wasm-bindgen = { workspace = true }
js-sys = { workspace = true }
web-sys = { workspace = true }
console_error_panic_hook = { workspace = true }

hedl-json = { workspace = true, optional = true }
hedl-yaml = { workspace = true, optional = true }
hedl-xml = { workspace = true, optional = true }
hedl-csv = { workspace = true, optional = true }
hedl-toon = { workspace = true, optional = true }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = { workspace = true }

[features]
default = ["json"]
json = ["dep:hedl-json"]
yaml = ["dep:hedl-yaml"]
xml = ["dep:hedl-xml"]
csv = ["dep:hedl-csv"]
toon = ["dep:hedl-toon"]
minimal = []
standard = ["json"]
full = ["json", "yaml", "xml", "csv", "toon"]
all-formats = ["json", "yaml", "xml", "csv", "toon"]
query-api = []
statistics = ["json"]
token-tools = []
full-validation = []
