Tauri 2

Use Tauri 2 when you want a small desktop app with web UI speed and native OS access, and you are willing to design a narrow Rust-backed authority boundary.

Good fits:

  • Local-first desktop tools with SQLite, file access, tray/menu integration, notifications, or native dialogs.
  • AI-native utilities that need to manage local model servers, MCP servers, CLIs, or other sidecar processes.
  • Internal tools where the desktop app is the product and mobile is a later smoke path, not the first market.
  • Cross-platform desktop apps where smaller bundles and OS-managed webviews matter more than identical rendering across every machine.

Weak fits:

  • Mobile-first consumer apps that need deep native APIs, background services, store-policy nuance, and low-end-device performance from day one.
  • Apps where pixel-identical rendering is more important than bundle size. Electron can be simpler when one Chromium engine is a product requirement.
  • Apps that need many broad shell, filesystem, HTTP, asset, or localhost permissions but cannot justify and test each one.
  • Teams that cannot test release artifacts on the actual target OS.

Stack Shape

LayerDefaultWhy
FrontendVite plus React, Svelte, Vue, Solid, or plain TypeScriptTauri behaves like a static web host; Vite keeps SPA builds predictable
Native coreRust under src-tauri/Commands, state, plugins, windows, sidecars, secrets, and OS authority live here
IPCTyped frontend wrapper over invokeKeeps the webview from knowing raw command names and payload details everywhere
SecurityCapabilities, permissions, scopes, CSP, and asset-protocol reviewTauri 2 access control is explicit per window/webview and per plugin command
PersistenceRust state plus Store, SQL, filesystem, or app-specific data layerKeep secrets and trusted state out of the renderer
Native integrationOfficial plugins first, custom plugins when commands become a reusable boundaryPlugins are the long-term boundary for native APIs and mobile bridges
SidecarsDesktop-only until proved otherwiseSidecars add process, update, signing, antivirus, and permission complexity
ReleaseOS signing plus separate updater signingCode signing and Tauri updater signatures solve different problems
TestingRust tests, frontend IPC mocks, WebDriver smoke, release artifact smokeDev-server success is not release evidence

First Pages To Read

Start desktop-first:

  1. Build a Vite frontend that emits static assets.
  2. Put OS authority behind a few Rust commands.
  3. Wrap invoke in typed frontend functions.
  4. Add one capability file for the main window and keep permissions narrow.
  5. Add plugins only when a maintained official plugin fits the job.
  6. Add sidecars only after you can name the binary, arguments, lifecycle, logs, cleanup, and release packaging plan.
  7. Treat Android/iOS as a separate platform proof, not an automatic extension of desktop success.

Gotcha: A Tauri app is not just a website in a window. The Rust core has full system access. The webview should receive only the commands, plugin permissions, URLs, and file scopes that the current window actually needs.

Minimum Done Criteria

Do not call a Tauri feature or app ready until the relevant gates are true:

AreaProof
ArchitectureCommand, plugin, sidecar, and frontend responsibilities are documented
Rust backendCommands validate inputs and Rust tests cover core logic
FrontendIPC wrapper has unit tests with mocked Tauri IPC
SecurityCapabilities, permissions, scopes, CSP, asset protocol, and remote URLs were reviewed
SidecarsTarget-triple binaries, allowed args, spawn/execute permissions, logs, and cleanup are tested
Desktop releaseRelease artifact was built and smoke-tested on the target OS
SigningOS signing and updater signing state are explicit, even if unsigned for internal builds
WebView2Windows install mode and clean-machine behavior are recorded
MobileAndroid/iOS plugins, permissions, signing, store policy, and device smoke were verified separately