[package]
name = "nbcl"
description = "Configuration language designed to be easy and understandable."
license = "Apache-2.0"
version = "0.4.2"
homepage = "https://nbcl-lang.github.io/"
repository = "https://github.com/NBCL-Lang/nbcl"
edition = "2024"

[dependencies]
ariadne = { version = "0.6.0", optional = true }
pest = "2.8.6"
pest_derive = "2.8.6"
rustc-hash = "2.1.2"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = { version = "0.2.121", optional = true }

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

[features]
default = ["module-imports", "lib-imports"]

# Enable imports (module and lib)
module-imports = []
lib-imports = []
# Add span info in resolved tree and node
metadata = []
# Makes printed errors beautiful
pretty-errors = ["dep:ariadne"]
# Add wasm support
wasm = ["wasm-bindgen", "serde_json"]

[profile.release]
lto = "fat"
codegen-units = 1
