You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wasm: publish docling.rs-wasm to npm; document the Tauri paths
The browser build had no consumable artifact: the wasm module existed only
inside the GitHub Pages demo deployment (built ad-hoc by pages.yml, never
published) or via a DIY cargo + wasm-bindgen build. `npm i docling.rs-wasm`
now works:
- crates/docling-wasm/npm/: the package skeleton — package.json with both
wasm-bindgen targets wired through `exports` (`docling.rs-wasm` → bundler,
`docling.rs-wasm/web` → self-initializing web target) and an npm-facing
README.
- scripts/ci/build_wasm_pkg.sh: assembles the package (wasm32 release build,
wasm-bindgen bundler + web, version from the workspace Cargo.toml) — used
by CI and runnable locally.
- npm-publish.yml `publish-wasm` job: pinned wasm-bindgen-cli (same
Cargo.lock trick as pages.yml), builds, then validates the *packed*
tarball by loading it in Node and converting a real HTML file before
publishing; idempotent via the same npm-view version check as the other
packages. Runs on the existing manual npm-publish dispatch, same
NPM_TOKEN.
- Docs: install/usage section in the crate README + the main README's
browser section (size claim refreshed: ~11 MB raw / ~3.4 MB gzipped at
0.49.x, the module now carries the browser ML pre/post-processing), and a
"Tauri and other desktop shells" section — recommending the native crate
in the Tauri Rust backend (full ML pipeline, spawn_blocking command
example, model resolution notes) over wasm-in-webview, with the COOP/COEP
note for ONNX Runtime Web threads and the Electron equivalent
(docling.rs N-API in the main process).
Verified locally end-to-end: built the package, npm pack, loaded the
tarball in Node 22 (43 supported extensions; HTML and a text-layer PDF
convert correctly).
Signed-off-by: artiz <artem.kustikov@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EY5KAiquN4YpVf2PXEQkVT
0 commit comments