tauri
Use when building cross-platform desktop or mobile apps with Tauri 2.x — project setup, IPC commands, plugin system, mobile targets, code signing, and distribution. Also use when comparing Tauri vs Electron.
| Model | Source |
|---|---|
| sonnet | pack: desktop |
Full Reference
┏━ 🔧 tauri ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Cross-platform desktop + mobile with Tauri 2.x ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Tauri 2.x builds native desktop (macOS, Windows, Linux) and mobile (iOS, Android) apps from a single web frontend + Rust backend. Ships a WebView — no bundled browser engine — so binaries stay under 10MB.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Version | 2.x stable (released Oct 2024) |
| Frontend | Any — React, Vue, Svelte, Vanilla JS |
| Backend | Rust (required) + Swift/Kotlin for mobile plugins |
| Min Rust | 1.77.2 |
| IPC | invoke() JS → #[tauri::command] Rust |
| Config | src-tauri/tauri.conf.json |
| CLI | npm create tauri-app@latest / cargo create-tauri-app |
Tauri vs Electron
Section titled “Tauri vs Electron”| Tauri | Electron | |
|---|---|---|
| Bundle size | ~3-10MB | ~80-120MB |
| Memory | System WebView | Bundled Chromium |
| Language | Rust backend | Node.js backend |
| Mobile | iOS + Android | No |
| Security | Capability-based | Node.js surface |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Scaffold, prereqs, and dev workflow | reference/setup.md |
Configure tauri.conf.json | reference/configuration.md |
| Call Rust from JS / JS from Rust | reference/ipc.md |
| Add official or custom plugins | reference/plugins.md |
| Target iOS and Android | reference/mobile.md |
| Build installers and sign for distribution | reference/build-and-dist.md |
Usage: Load the reference file matching the current task. Each file is self-contained with working code snippets and common gotchas.