tauri
Installation
SKILL.md
Tauri
Overview
Tauri is a framework for building cross-platform desktop and mobile applications using any web framework for the frontend and Rust for the backend. By using the system webview instead of bundling Chromium, Tauri produces binaries under 10MB with 30-80MB memory usage, featuring capability-based security, type-safe IPC commands, and a plugin ecosystem for native APIs.
Instructions
- When setting up the architecture, build the UI with any web framework (React, Vue, Svelte, Solid) rendered in the system webview, and implement system access and heavy computation in Rust backend commands.
- When implementing IPC, define Rust functions with
#[tauri::command]for request-response patterns (called viainvoke()from JS), and use events for push-style communication from backend to frontend. - When accessing native APIs, use Tauri plugins (
@tauri-apps/plugin-fs,@tauri-apps/plugin-dialog,@tauri-apps/plugin-shell,@tauri-apps/plugin-notification) and define allowed capabilities in thecapabilities/directory. - When managing security, define capability-based permissions to restrict which APIs the frontend can access, set CSP headers, and use the isolation pattern for sandboxed environments.
- When building for distribution, use
cargo tauri buildto produce platform-specific installers (NSIS/MSI for Windows, DMG for macOS, AppImage/deb for Linux) with code signing and notarization. - When implementing auto-updates, use
@tauri-apps/plugin-updaterwith GitHub Releases or a custom server, with signature verification to prevent tampering.
Examples
Example 1: Build a note-taking app with encrypted local storage
Related skills