Motivation
Quill already uses pdfium-render and a native PDFium library for PDF import metadata and first-page cover rendering. Today src-tauri/build.rs downloads the platform PDFium binary from bblanchon/pdfium-binaries during build. That keeps the repo smaller, but it makes builds depend on network availability and the continued availability of an external release asset.
If PDFium becomes load-bearing for the reader, the native binary should be treated as vendored runtime infrastructure rather than a best-effort build download.
Scope summary
- Decide whether to commit the shipped PDFium binaries directly under
src-tauri/binaries/ or move them to a controlled, checksum-verified artifact flow.
- Pin and document the PDFium source/version, currently
chromium/7857 from bblanchon/pdfium-binaries.
- Replace download-on-build behavior with validation/copy/env setup that works offline.
- Keep Tauri packaging paths stable for macOS and Windows, with Linux support preserved for CI/tests if needed.
- Document update steps for refreshing PDFium.
Relevant code
src-tauri/build.rs downloads and publishes platform PDFium binaries.
src-tauri/src/pdfium.rs locates and lazily binds the runtime library.
src-tauri/Cargo.toml depends on pdfium-render.
src-tauri/tauri.*.conf.json references bundled binary/resource paths.
Implementation phases
- Inventory current target binaries and bundle paths.
- Add checksum/version documentation for each shipped binary.
- Change
build.rs to validate existing binaries and set PDFIUM_DEV_LIB_PATH without network fetches.
- Confirm dev, test, and package flows work without network access.
Verification
cd src-tauri && cargo test commands::books::tests::extract_pdf_renders_cover_for_valid_pdf
cd src-tauri && cargo test --lib
pnpm run package on supported release targets
- Manual offline build smoke test
Priority
P2. This is not a current release blocker, but it becomes important before PDFium is expanded from cover extraction to core PDF reading.
Motivation
Quill already uses
pdfium-renderand a native PDFium library for PDF import metadata and first-page cover rendering. Todaysrc-tauri/build.rsdownloads the platform PDFium binary frombblanchon/pdfium-binariesduring build. That keeps the repo smaller, but it makes builds depend on network availability and the continued availability of an external release asset.If PDFium becomes load-bearing for the reader, the native binary should be treated as vendored runtime infrastructure rather than a best-effort build download.
Scope summary
src-tauri/binaries/or move them to a controlled, checksum-verified artifact flow.chromium/7857frombblanchon/pdfium-binaries.Relevant code
src-tauri/build.rsdownloads and publishes platform PDFium binaries.src-tauri/src/pdfium.rslocates and lazily binds the runtime library.src-tauri/Cargo.tomldepends onpdfium-render.src-tauri/tauri.*.conf.jsonreferences bundled binary/resource paths.Implementation phases
build.rsto validate existing binaries and setPDFIUM_DEV_LIB_PATHwithout network fetches.Verification
cd src-tauri && cargo test commands::books::tests::extract_pdf_renders_cover_for_valid_pdfcd src-tauri && cargo test --libpnpm run packageon supported release targetsPriority
P2. This is not a current release blocker, but it becomes important before PDFium is expanded from cover extraction to core PDF reading.