[package]
name = "fulgur"
version = "0.26.0"
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
description = "HTML/CSS to PDF conversion library"
readme = "../../README.md"
keywords = ["pdf", "html", "css", "converter"]
categories = ["text-processing", "command-line-utilities"]

[features]
## Enable rayon-based thread parallelism in `Engine::render_batch`.
parallel = ["dep:rayon"]

[dependencies]
rayon = { version = "1", optional = true }
cssparser = "0.37"
krilla = "0.7.0"
krilla-svg = "0.7.0"
usvg = "0.45"
blitz-html = "0.2"
blitz-dom = "0.2"
blitz-traits = "0.2"
taffy = "0.9"
parley = "0.6"
skrifa = "0.43"
stylo = "0.8.0"
woff2-patched = "0.4"
thiserror = "2"
minijinja = { version = "=2.21.0", features = ["unstable_machinery"] }
serde_json = "1"
log = "0.4"
lopdf = "0.40.0"
unicode-segmentation = "1.13"
unicode-properties = "0.1"
# Force-enable `image`'s `png` feature so PNG decoding (used by blitz-dom for
# `<img>` tags and CSS background-image) works consistently across every fulgur
# build target. Without this, `blitz-dom-0.2.4`'s `image = { default-features =
# false }` makes PNG decoding depend on which other workspace member is built
# alongside fulgur, producing different page-count outputs in CLI vs WPT runner
# (fulgur-zsn8).
image = { version = "0.25", default-features = false, features = ["png"] }
serde = { version = "1", features = ["derive"] }

# WASM (wasm32-unknown-unknown) build support: pulled in transitively by lopdf/rand.
# Feature unification propagates `wasm_js` to the lopdf-side dependency so the
# crate selects the `crypto.getRandomValues()` backend instead of failing with
# `compile_error!`. Browser-class targets only — WASI requires a different
# backend selection. Tracking: fulgur-iym (strategic v0.7.0).
[target.'cfg(target_arch = "wasm32")'.dependencies]
getrandom = { version = "0.4", default-features = false, features = ["wasm_js"] }

[dev-dependencies]
tempfile = "3.27.0"
image = { version = "0.25", default-features = false, features = ["png"] }
toml = "1.1"
