Skip to main content

Building from Source

nque is a Tauri 2 application, so you need both a Rust toolchain and a JavaScript toolchain to build it from source.

Prerequisites​

  • Rust (stable) — install via rustup.
  • Node.js 20+ and pnpm — the repository is managed with pnpm.
  • Tauri 2 system dependencies — follow the Tauri prerequisites guide for your platform (on macOS this is the Xcode Command Line Tools; on Linux you need webkit2gtk, librsvg, and related packages).
  • CMake & a C++ toolchain — required to build PDFium (used for PDF rendering in the OCR crate).

Install dependencies​

From the repository root:

pnpm install

This installs the frontend dependencies. Cargo dependencies are fetched automatically on first build.

Download the OCR models​

The OCR fallback uses the ocrs engine, which reads two .rten model files that are not checked into git. Download them once with the provided script:

./crates/ocr/scripts/download-models.sh

The models are written to crates/ocr/models/ and embedded into the binary at compile time. The crate will not build without them.

Run the app​

# Frontend only (Vite dev server, no native shell)
pnpm dev

# Full desktop application (Rust + frontend, hot reload)
pnpm tauri dev

pnpm tauri dev compiles the Rust backend and launches the native window, pointing it at the Vite dev server on http://localhost:1420.

Build a release bundle​

pnpm tauri build

This produces platform installers/bundles under src-tauri/target/release/bundle/.

note

The first Tauri build is slow because it compiles the full Rust dependency graph, including PDFium and the OCR runtime. Subsequent builds are incremental.

Next steps​