Tauri 2 + React + Vite (Rust Desktop App)
Desktop app rules for Tauri 2: React + Vite + TypeScript UI, typed Rust commands, least-privilege capabilities, SQLite in Rust, updater and signed CI builds.
- Formats
- 4 files
- AGENTS.md
- 47 lines
- CLAUDE.md
- 16 lines
- Languages
- Rust, TypeScript
- Updated
- Oct 2026
- Used by
- 4 projects
Writes .claude/skills/tauri-react-desktop/SKILL.md
$ curl -s --create-dirs -o .claude/skills/tauri-react-desktop/SKILL.md https://stackitfast.com/rules/tauri-react-desktop/SKILL.mdRule files
Works with Claude Code · Cursor · Windsurf · AGY
Architecture notes
Architecture Overview
A desktop app with a web UI and a Rust core. Tauri 2 renders a React + Vite frontend in the system WebView and exposes typed Rust commands for everything that touches the operating system, the file system or the local SQLite database. The result is a small, signed, auto-updating binary for macOS, Windows and Linux.
Why it suits AI coding agents
- A hard boundary. The UI asks for intents, Rust does the work. An agent can change either side and the compiler plus TypeScript catch most contract breaks.
- Security is declarative. Capability files list exactly which commands each window may call, so an agent adding a feature also has to add the permission, which reviewers see in the diff.
- Plain Rust core. Domain logic in
core/has no Tauri types and is unit-tested like any other crate.
In the directory
Hoppscotch ships a Tauri desktop app next to its web client, VoiceStudio uses Tauri alongside Electron, and RustDesk shows how far a Rust core can go on the desktop. For server-side Rust web stacks, see Building web apps in Rust in 2026.
Frequently asked questions
Tauri or Electron in 2026?
Tauri uses the operating system's WebView and a Rust core, so installers are typically a few megabytes and idle memory is far lower than Electron, which bundles Chromium and Node.js. Electron still wins when you need identical rendering on every OS or deep Node.js ecosystem access; several directory projects, such as VoiceStudio, ship both.
Do I need to know Rust to use Tauri?
Only for the native parts. The UI is ordinary React and TypeScript, and many apps need just a handful of Rust commands. Those commands are exactly where an AI agent benefits from the Rust compiler, which is why this rule keeps all OS and data access in Rust.
Why is my Tauri command not callable from the frontend?
In Tauri 2 a command must be registered in tauri::generate_handler! and allowed by a permission in a capability file for that window. Forgetting the capability is the most common cause of "command not allowed" errors.
Should the frontend use tauri-plugin-sql directly?
It can, but this rule keeps SQLite in Rust so the WebView never holds raw SQL access, queries are checked by sqlx at compile time, and the database schema has one owner. Use the plugin only for small apps where that boundary is not worth it.
Used in production
Explore all stacksGotify
6Gotify keeps the server one deployable Go binary by embedding its Vite/React web UI, using Gin and gorilla/websocket for the REST and streaming API, and swapping SQLite, MySQL or PostgreSQL through GORM, while a compiled Go plugin system handles extensibility instead of a scripting layer.
RustFS
1RustFS splits a MinIO-style object store into dozens of single-purpose Rust crates behind one binary, keeps extra protocols behind cargo features, and moves inter-node traffic to gRPC, so storage, healing and IAM evolve separately.
Orca
1Agent CLIs stay the user's own. Orca adds the orchestration layer around them: isolated git worktrees, a PTY daemon that outlives the UI, and a relay for mobile steering. It can support new agents without bundling them.
MindsHub (formerly MindsDB)
1Splitting the client, API and agent into separately versioned git submodules lets each ship on its own cadence (a signed desktop app, a PyPI server package, an agent package), while one Makefile and one docker-compose.yml still bring the whole stack up together.