[package]
name = "dreport-layout"
version = "0.2.0"
edition = "2024"
description = "Layout engine for dreport (taffy + cosmic-text)"
license = "MIT"
publish = ["gitea"]


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

[dependencies]
dreport-core = { version = "0.2.0", path = "../core", registry = "gitea" }
dexpr = { version = "0.3.0", registry = "gitea" }
rust_decimal = "1.41"
taffy = "0.9"
cosmic-text = { version = "0.18", default-features = false, features = ["std", "swash"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
rxing = { version = "0.8", default-features = false, features = ["encoding_rs"] }

[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "0.2"
js-sys = "0.3"
getrandom_03 = { package = "getrandom", version = "0.3", features = ["wasm_js"] }
getrandom_04 = { package = "getrandom", version = "0.4", features = ["wasm_js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
krilla = { version = "0.6", features = ["raster-images", "simple-text"] }
image = { version = "0.25", default-features = false, features = ["png", "jpeg"] }
base64 = "0.22"

[features]
default = []
wasm = []
