tauri
Installation
SKILL.md
Tauri v2 Development Skill
Build cross-platform desktop and mobile apps with web frontends and Rust backends using Tauri v2.
Core Principles
- Architecture: Use Rust for the backend (performance, native APIs) and any web framework for the frontend (UI, routing).
- Communication: Use Tauri's IPC (
invoke,events,channels) to bridge the Rust backend and the web frontend. - Security-First: Everything is denied by default. Explicitly configure permissions in
src-tauri/capabilities/to allow frontend access to backend commands and plugins. - Cross-Platform: Write once, compile to Windows, macOS, Linux, Android, and iOS. Use
lib.rsfor shared logic.
Quick Setup Checklist
Before making changes to a Tauri project, verify:
src-tauri/tauri.conf.jsonhasbuild.devUrlandbuild.frontendDistconfigured.src-tauri/capabilities/default.jsonexists and includes necessary permissions.- All custom Rust commands are registered in
tauri::generate_handler![]withinlib.rsormain.rs. lib.rscontains shared code, essential for mobile builds.