[package]
name = "eadup"
version = "0.1.1"
edition = "2024"
authors = ["wellman4"]
license = "AGPL-3.0-or-later"
repository = "https://github.com/wellman4/eadup"

description = "A semantic markup language and compiler for automated, standards-compliant document typesetting"
readme = "README.md"
keywords = ["typesetting", "compiler", "pdf", "wasm", "eadup"]
categories = ["compilers", "text-processing", "rendering", "wasm", "command-line-utilities"]

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

[[bin]]
name = "eadup"
path = "src/main.rs"

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
printpdf = "0.9.1"
swash = "0.2.7"

clap = { version = "4.6.1", features = ["derive"], optional = true }

wasm-bindgen = { version = "0.2.118", optional = true }

[features]
default = ["cli"]
cli = ["dep:clap"]
wasm = ["dep:wasm-bindgen"]

[profile.release]
opt-level = 3
lto = "thin"
strip = false 

[profile.wasm]
inherits = "release"
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true