App Tauri Builder
When to use
Targets windows, macos, ubuntu, centos, appimage. Tauri 2 is the imposed desktop engine; never switch to Electron or WinUI 3.
Inputs
os/<target>scaffold, frontend dist path, app name and identifier, package manager.
Procedure (run inside os/<target>)
appfactory action=scaffold target=<id>(refuses to overwrite).npm install -D @tauri-apps/cli@^2(pnpm add -D,yarn add -D,bun add -d).- If no
src-tauri/:npx tauri init --ci --app-name "<name>" --window-title "<name>" --frontend-dist <rel path to dist> --dev-url http://localhost:5173 --before-dev-command "<pm> run dev" --before-build-command "<pm> run build". src-tauri/tauri.conf.json:build.frontendDistmust point to static files (for example../../../distor../web/dist),build.beforeBuildCommandbuilds them (withcwdhandled by a script inos/<target>),identifierreverse DNS,app.security.cspset (nounsafe-eval).src-tauri/capabilities/default.json: onlycore:defaultplus the plugin permissions really used (seeapp-native-capabilities).- Rust targets:
rustup target add x86_64-pc-windows-msvc(Windows),rustup target add aarch64-apple-darwin x86_64-apple-darwin(macOS universal:--target universal-apple-darwin). - Dev:
npx tauri dev. - Build (
exec background=true):- Windows:
npx tauri build --bundles msi,nsis - macOS:
npx tauri build --bundles dmg - Ubuntu:
npx tauri build --bundles deb - CentOS / Fedora:
npx tauri build --bundles rpm - AppImage:
npx tauri build --bundles appimage
- Windows:
- Updater / signing:
npx tauri signer generate -w ~/.tauri/<app>.keyonce; build withTAURI_SIGNING_PRIVATE_KEYandTAURI_SIGNING_PRIVATE_KEY_PASSWORDfrom env, never committed. OS code signing:app-release-manager. appfactory action=artifacts target=<id>; packages are undersrc-tauri/target/release/bundle/<msi|nsis|dmg|deb|rpm|appimage>/.
Verification
Artifact present with size > 0; binary launches (app-device-tester).
Failure modes and fixes
See app-build-repair: frontendDist empty, missing webkit2gtk-4.1, link.exe not found, WebView2 missing, Rust target missing, white screen.
Deliverable
The desktop package path(s); report step build.
