Skip to main content

Development Setup

Prerequisites​

See Building from Source for the Rust, Node, Tauri, and PDFium requirements. In short:

  1. Install Rust (stable), Node 20+, and pnpm.
  2. Install the Tauri 2 system dependencies for your platform.
  3. pnpm install
  4. ./crates/ocr/scripts/download-models.sh to fetch the OCR models.

Commands​

pnpm dev # Vite dev server (frontend only)
pnpm tauri dev # Full Tauri app (Rust + frontend)
pnpm test # Run Vitest once
pnpm test:watch # Vitest in watch mode
pnpm build # TypeScript compile + Vite build
pnpm tauri build # Full Tauri production bundle
pnpm generate:licenses # Regenerate src/generated/licenses.ts

Rust tests run from the workspace root:

cargo test # All crates
cargo test -p show # A single crate

Package manager​

The project uses pnpm. Do not commit package-lock.json or yarn.lock.

Path alias​

@/ resolves to src/ in both TypeScript and Vite. Prefer it over long relative paths.

Editor recommendations​

  • VS Code with the Tauri extension and rust-analyzer.

Documentation site​

The Docusaurus documentation site lives in docs/ and is a standalone pnpm package:

cd docs
pnpm install
pnpm start # local dev server with hot reload
pnpm build # static production build into docs/build
pnpm serve # preview the production build

It uses the offline @easyops-cn/docusaurus-search-local plugin, so full-text search is generated at build time with no external service.

Next steps​