[package]
name = "pdf-render"
version = "1.0.0-beta.17"
description = "A PDF rasterizer in pure Rust."
edition = "2024"
license = "Apache-2.0 OR MIT"
readme = "README.md"
authors = ["PDFluent Contributors <team@pdfluent.com>", "Laurenz Stampfl <laurenz.stampfl@gmail.com>"]
repository = "https://pdfluent.com/source"
homepage = "https://pdfluent.com"
documentation = "https://pdfluent.com/docs"

[dependencies]
pdf-interpret = { path = "../pdf-interpret", version = "=0.5.7" }
kurbo = "0.13.0"
image = { version = "0.25", features = ["png"] }
bytemuck = { version = "1", features = ["bytemuck_derive"] }
vello_cpu = { version = "0.0.6", default-features = false, features = ["std", "png", "u8_pipeline", "f32_pipeline"] }
fast_image_resize = { version = "6.0", default-features = false, features = ["std"] }

# Multi-threaded CPU rasterization is enabled on native targets only. The
# vello_cpu `multithreading` feature pulls rayon/crossbeam (no wasm32 support),
# so wasm32 keeps the single-threaded path. Output is identical to single-thread
# (deterministic tiled raster) — verified by a byte-equality fidelity test.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
vello_cpu = { version = "0.0.6", default-features = false, features = ["std", "png", "u8_pipeline", "f32_pipeline", "multithreading"] }

[dev-dependencies]
log = "0.4"
lopdf = { package = "pdfluent-lopdf", path = "../lopdf", version = "=0.39.4" }

[features]
default = ["embed-fonts", "embed-cmaps"]
embed-fonts = ["pdf-interpret/embed-fonts"]
embed-cmaps = ["pdf-interpret/embed-cmaps"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
