[package]
name = "domainforge-core"
version = "0.13.0"
authors = ["DomainForge Contributors"]
edition = "2021"
rust-version = "1.77"
description = "Rust core library implementing the SEA DSL primitives and validation engine."
license = "Apache-2.0"
homepage = "https://github.com/GodSpeedAI/DomainForge"
repository = "https://github.com/GodSpeedAI/DomainForge"

[dependencies]
uuid = { version = "=1.19.0", features = ["v4", "v5", "v7", "serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
icu_decimal = { version = "1.5", optional = true }
icu_locid = { version = "1.5", optional = true }
fixed_decimal = { version = "0.5", optional = true }
rust_decimal = { version = "1.33", features = ["serde"] }
chrono = { version = "0.4", default-features = false, features = ["serde", "std", "wasmbind", "clock"] }
pest = "2.7"
pest_derive = "2.7"
indexmap = { version = "2.0", features = ["serde"] }
log = "0.4.21"
globset = "0.4"
globwalk = "0.9"
toml = { version = "0.8", features = ["parse"] }
regex = { version = "1.11", default-features = false, features = ["std", "unicode"] }
once_cell = "1.19"
rustc-hash = "2.0"
xxhash-rust = { version = "0.8", features = ["xxh64"] }
pyo3 = { version = "0.29.0", features = ["extension-module"], optional = true }
pythonize = { version = "0.29", optional = true }
napi = { version = "2.16", features = ["async", "dyn-symbols"], optional = true }
napi-derive = { version = "2.16", optional = true }
wasm-bindgen = { version = "0.2", optional = true }
serde-wasm-bindgen = { version = "0.6", optional = true }
lol_alloc = { version = "0.4", optional = true }
percent-encoding = "2.3.2"
roxmltree = "0.21.1"
oxigraph = { version = "0.3", optional = true }
clap = { version = "4.5", features = ["derive"], optional = true }
colored = { version = "2.0", optional = true }
anyhow = "1.0.100"
schemars = { version = "0.8", features = ["chrono", "rust_decimal", "indexmap2"], optional = true }
sha2 = "=0.10"
ed25519-dalek = { version = "=2.1.0", features = ["pem", "std"], optional = true }
unicode-normalization = "0.1"
base64 = "=0.22"

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

[dev-dependencies]
proptest = { version = "1.0", features = ["std", "bit-set"] }
wasm-bindgen-test = "0.3"
jsonschema = { version = "0.18" }
roxmltree = "0.21.1"
rust_decimal_macros = "1.33"
schemars = { version = "0.8", features = ["chrono", "rust_decimal", "indexmap2"] }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tempfile = "3.12"
assert_cmd = "2.0"
predicates = "3"
# Note: criterion was removed due to unmaintained/unsound `atty` transitive dependency (RUSTSEC-2024-0375, RUSTSEC-2021-0145).
# If benchmarks are needed, consider using `divan` or re-adding criterion when its deps are updated.

[build-dependencies]
napi-build = "2.1"

[lib]
name = "domainforge_core"
path = "src/lib.rs"
crate-type = ["rlib", "cdylib"]

[features]
default = []
python = ["pyo3", "pythonize", "signing"]
typescript = ["napi", "napi-derive", "signing"]
wasm = ["wasm-bindgen", "serde-wasm-bindgen", "uuid/js", "lol_alloc"]
shacl = ["oxigraph"]
formatting = ["icu_decimal", "icu_locid", "fixed_decimal"]
cli = ["three_valued_logic", "clap", "colored", "signing"]
three_valued_logic = []
json-schema = ["schemars"]
signing = ["ed25519-dalek"]


## NOTE: Profiles are managed at the workspace root (Cargo.toml). Please
## update the workspace-level profiles in /Cargo.toml rather than in
## this crate's Cargo.toml. This avoids the "profiles for the non root
## package will be ignored" cargo warning.

[[bin]]
name = "domainforge"
path = "src/bin/domainforge.rs"
required-features = ["cli"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Oz", "--enable-mutable-globals", "--enable-bulk-memory", "--enable-nontrapping-float-to-int", "--enable-sign-ext"]
