# Tauri — Smaller, Faster, More Secure Desktop Apps in Rust > Tauri lets you build smaller, faster, and more secure desktop and mobile applications with any web frontend. Rust backend + OS native WebView (no bundled Chromium) produces ~3MB binaries compared to Electron 150MB. ## Install Save the content below to `.claude/skills/` or append to your `CLAUDE.md`: ## Quick Use Prereqs: Rust toolchain (via rustup), Node.js. ```bash # Create project npm create tauri-app@latest # Pick frontend: Vanilla/React/Vue/Svelte/Solid cd my-app npm install npm run tauri dev ``` Call Rust from frontend: ```rust // src-tauri/src/main.rs #[tauri::command] fn greet(name: &str) -> String { format!("Hello, {}!", name) } fn main() { tauri::Builder::default() .invoke_handler(tauri::generate_handler![greet]) .run(tauri::generate_context!()) .expect("error while running tauri app"); } ``` ```ts import { invoke } from "@tauri-apps/api/core"; const msg = await invoke("greet", { name: "William" }); ``` ## Intro Tauri is a toolkit for building smaller, faster, and more secure desktop and mobile applications with a web frontend. Instead of bundling Chromium (like Electron), Tauri uses the the OS native WebView (WebKit on macOS/Linux, WebView2 on Windows) and a Rust backend. - **Repo**: https://github.com/tauri-apps/tauri - **Stars**: 105K+ - **Language**: Rust - **License**: Apache 2.0 / MIT ## What Tauri Does - **Rust backend** — filesystem, shell, network, native APIs - **Commands** — TypeScript → Rust function calls - **System tray** — cross-platform tray icons - **Menus** — native menu bar, context menus - **Updater** — cryptographically signed auto-updates - **Sidecar binaries** — ship extra executables - **Mobile (v2)** — iOS and Android targets - **Permissions** — granular allowlist per capability ## Architecture One process split into Core (Rust) + WebView (HTML/JS). Frontend calls Rust commands via IPC. Tauri v2 introduces a plugin system, mobile support, and fine-grained capability-based permissions (replacing the v1 allowlist). ## Self-Hosting ```bash npm run tauri build # Produces platform-specific installers in src-tauri/target/release/bundle/ # .msi / .dmg / .app / .deb / .rpm / .AppImage ``` ## Key Features - 3-10MB binaries (vs Electron 150MB) - Rust backend (memory-safe, fast) - Mobile support (iOS/Android) - Capability-based security - Code signing (Windows + macOS) - Cross-platform installers - Plugin ecosystem - ~80MB idle memory ## Comparison | Framework | Size | Language | Mobile | Runtime | |---|---|---|---|---| | Tauri | 3-10MB | Rust + JS | Yes (v2) | OS WebView | | Electron | ~150MB | JS | No | Chromium + Node | | Wails | ~8MB | Go + JS | No | OS WebView | | Neutralino | ~2MB | C++ + JS | No | OS WebView | ## FAQ **Q: What do I do about WebView inconsistencies?** A: Rendering differs across macOS Safari, Windows Edge, and Linux WebKitGTK. Test every target. Tauri 2 is improving consistency. **Q: Do I have to learn Rust?** A: Not for basic commands. You only write Rust when customizing native features. Most web developers pick it up within a few days. **Q: What's the difference between v1 and v2?** A: v2 adds mobile support, a new permission system, and a plugin architecture. v1 is desktop-only. ## Sources & Credits - Docs: https://tauri.app/ - GitHub: https://github.com/tauri-apps/tauri - License: Apache 2.0 / MIT --- Source: https://tokrepo.com/en/workflows/tauri-smaller-faster-more-secure-desktop-apps-rust-70e5a5ec Author: Script Depot