[package]
name = "mldsa65"
description = "ML-DSA-65 (FIPS 204) digital signatures with WASM bindings"
version.workspace = true
rust-version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
publish = true
readme = "README.md"

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

[features]
default = []
wasm = ["dep:wasm-bindgen", "dep:serde-wasm-bindgen", "dep:tsify", "dep:base64", "dep:zeroize", "mldsa-core/wasm"]
talc = ["dep:talc"]

[dependencies]
ml-dsa.workspace = true
mldsa-core = { workspace = true}

# wasm
base64 = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
serde-wasm-bindgen = { workspace = true, optional = true }
tsify = { workspace = true, optional = true }
zeroize = { workspace = true, optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.4", features = ["wasm_js"] }

[target.'cfg(target_family = "wasm")'.dependencies]
talc = { workspace = true, optional = true }

[dev-dependencies]
wasm-bindgen-test.workspace = true