[package]
name = "holtburger-dat"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
holtburger-common.workspace = true
binrw.workspace = true
jpeg-decoder.workspace = true
serde.workspace = true
thiserror.workspace = true
bitflags.workspace = true
encoding_rs.workspace = true
log.workspace = true
rayon.workspace = true

# Native uses the C-backed `zstd` crate (decompress + compress, the latter
# needed by the dat2hba tool). Wasm32 uses pure-Rust `ruzstd` for
# decompression only — DAT/HBA files are decompress-only at client
# runtime, and `zstd-sys` requires a C cross-compiler that's out of scope
# for the Phase 2 floor (see docs/phase-2-wasm-spike.md §4.2).
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
zstd.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
ruzstd.workspace = true

[dev-dependencies]
tempfile.workspace = true
rand.workspace = true
criterion.workspace = true
serde_json.workspace = true
# Phase-5 S5 producer (examples/bake_texchan.rs): the texchan codec + sha2
# for the bake-source provenance hash. Acyclic — suite-bake deps only
# holtburger-common, not holtburger-dat.
holtburger-suite-bake = { path = "../holtburger-suite-bake" }
sha2.workspace = true

[[example]]
name = "bake_texchan"

[[example]]
name = "verify_texchan"

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