Tauri Desktop App
Overview
Use this skill to design and implement Tauri desktop features safely and consistently, with a focus on IPC boundaries, permission scoping, and production readiness.
Project-Specific Rules (fricon)
- •This repository uses Tauri v2 with
tauri-spectafor typed IPC bindings. - •Keep IPC bindings generation explicit via script (
pnpm --filter fricon-ui run gen:bindings), not automatic on debug app startup. - •Keep CI
fmtlightweight. Do not add Rust-compiling or bindings-generation work tofmt; place those checks intest. - •Treat generated bindings (
crates/fricon-ui/frontend/src/lib/bindings.ts) as generated artifact:- •Regenerate when Rust command/event signatures change.
- •Keep linter/formatter noise out of this file via ignore configuration.
Quick Triage
- •IPC, Rust commands, native APIs, file system access, or CSP: read
references/tauri-security-and-ipc.md. - •Windows, menus, tray, deep links, updater, or packaging: read
references/tauri-app-features.md.
Workflow
- •Classify the request: frontend-only or needs a Rust command.
- •Define the security surface: permissions/allowlist, input validation, and least-privilege APIs.
- •Implement the Rust command and frontend wrapper with typed payloads and explicit errors.
- •Integrate UX behavior (window, menu, tray, shortcuts) and persistence.
- •Update config/build settings for production, packaging, and updater.
- •If IPC changed, regenerate
bindings.tsand ensure CI checks still match project policy.
Conventions
- •Keep IPC small and explicit. Prefer a few narrow commands over a broad generic bridge.
- •Validate all inputs in Rust. Treat frontend data as untrusted.
- •Keep a single frontend entry module for native calls (example:
src/lib/tauri.ts). - •For file operations, constrain to user-selected paths and validate path traversal.
Example Triggers
- •"Add a file-open dialog and read a file"
- •"Expose a Rust command for database access"
- •"Add a tray icon with a menu"
- •"Package for macOS/Windows and enable auto-updater"
References
- •
references/tauri-security-and-ipc.md - •
references/tauri-app-features.md