/src-tauri/CLAUDE.md
CLAUDE.md at /src-tauri/CLAUDE.md
Path: src-
Tauri (two modes)
zudo-doc ships two independent Tauri apps. This file auto-loads when working in src-tauri/; src-tauri-dev/ is Mode 2 below.
Mode 1 — Standalone offline reader (src-tauri/)
Bundles zudo-doc's own pre-built dist/ into a self-contained desktop app.
Build (shipped product):
cargo tauri buildEmbedsdist/viafrontendDist; WebView loadsWebviewUrl::App. There is nobeforeBuildCommand, so build the embeddeddist/first — and useGEN_DOC_HISTORY=1 pnpm buildso the offline reader includes the per-page history-dropdown JSON (postBuild JSON is opt-in for local builds, #1986; a plainpnpm buildwould silently ship adist/without it).cargo tauri dev(contributor convenience only): Runspnpm devviabeforeDevCommandand opens the WebView athttp:(the zfb dev server). This is NOT a shipped product — it exists solely for zudo-doc contributors who want to work on both the Tauri shell and site content at the same time. The/ / localhost: 4321/ beforeDevCommand/devUrlfields insrc-must be kept for this workflow.tauri/ tauri. conf. json
Mode 2 — Configurable dev wrapper for end users (src-tauri-dev/)
A standalone Tauri app that any project can use as a desktop dev wrapper. It reads the target project URL and settings from a per-user config file rather than hard-coding anything.
Build (shipped product):
cd src-tauri-dev && cargo tauri buildConfig file (macOS):
~/(Windows/Linux paths differ; seeLibrary/ Application Support/ com. takazudo. zudo- doc- dev/ config. json src-tauri-dev/for details.)
Key distinction
Mode 1 cargo tauri dev and Mode 2 are both "dev wrappers" superficially, but they target completely different audiences. Mode 1 dev is a repo-internal contributor convenience (hard-coded to this project, not shipped). Mode 2 is a product delivered to end users of any project (configurable, shipped as a standalone installer).
See src- for the full comparison table and the CSP / capabilities security hardening notes (zudolab/zudo-doc#2240).