Skip to content

A fast, helpful, and open-source document parser

1.3 KB
Raw Blame
[package]
name = "liteparse-wasm"
version = "2.18.0"
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "LiteParse PDF parser — WebAssembly bindings for the browser"

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

[dependencies]
liteparse = { path = "../liteparse", default-features = false }
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
js-sys = "0.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde-wasm-bindgen = "0.6"
tsify-next = { version = "0.5", default-features = false, features = ["js"] }
console_error_panic_hook = { version = "0.1", optional = true }

# Direct dependency purely so this crate's build script receives
# DEP_PDFIUM_LIB_PATH (pdfium-sys sets `links = "pdfium"`). build.rs uses it to
# detect whether pdfium ships a standalone libsetjmp.a and, if so, drop the
# fallback setjmp/longjmp stubs in wasi_stubs.rs. Only the wasm target links
# pdfium statically, so scope it there.
[target.'cfg(target_arch = "wasm32")'.dependencies]
pdfium-sys = { package = "liteparse-pdfium-sys", version = "1.13.0", path = "../pdfium-sys" }

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"

[features]
default = ["panic_hook"]
panic_hook = ["dep:console_error_panic_hook"]

[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O3"]