// Stack

Tauri

Last updated ·

Tauri is a framework for building desktop and mobile apps from a web interface and a Rust core, rendered in the operating system's own webview instead of a bundled browser. EOXLABS uses Tauri 2 when a product needs an installable app that reuses its web interface and keeps every native capability behind explicit, reviewable permissions.

Tauri 2.0 became stable on October 2, 2024. It added iOS and Android, and replaced the old allowlist with permissions, scopes and capabilities. Radically Open Security audited the v2 architecture before release, with funding from NLnet through NGI. In the EOXLABS stack, Tauri is the answer for desktop software that has to share an interface with the web, one part of the native apps capability.

How is an EOXLABS Tauri app put together?

The interface is a SvelteKit app built as a single-page app. Tauri's SvelteKit guide uses adapter-static, turns off server rendering with export const ssr = false, and points frontendDist at ../build, because "Tauri doesn't support server-based solutions". The guide's snippets still edit svelte.config.js; in SvelteKit 3 that configuration lives in vite.config.js, as the SvelteKit page explains.

The core is Rust. Functions marked #[tauri::command] are registered with generate_handler! and called from the interface with invoke (calling Rust). Arguments arrive as JSON and are deserialized with serde; return values and errors must be serializable. A successful deserialization only proves the JSON had the right shape, so EOXLABS still checks paths, sizes and ranges inside each command. The Rust page covers when heavier work belongs in that core.

The renderer depends on the platform. Per Tauri's webview reference, Windows uses WebView2, which is Chromium-based and updates itself. macOS and iOS use WKWebView, which updates with the operating system, so unsupported macOS versions get no WebKit updates. Linux uses WebKitGTK, and Android uses the system WebView. EOXLABS tests every interface on both Chromium and WebKit, and sets the minimum macOS version by the WebKit features the interface needs.

What does the capability system actually restrict?

A capability grants permissions to named windows or webviews. A permission allows or denies specific commands and can carry a scope, such as allowing $HOME/* while denying $HOME/secret. Capability files live in src-tauri/capabilities and can target specific platforms:

{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "main-window",
  "windows": ["main"],
  "platforms": ["linux", "macOS", "windows"],
  "permissions": ["fs:default", "global-shortcut:allow-register"]
}

EOXLABS checks three details in every review:

  1. The app's own commands are open by default. Tauri's documentation states that every command registered with invoke_handler is available to all windows and webviews unless AppManifest::commands in build.rs changes that. EOXLABS declares app commands there, so each window gets only what its capability grants.
  2. Remote content stays out. By default only bundled code can call Tauri's API. A remote section opens commands to listed URLs, and on Linux and Android Tauri can't tell an embedded iframe from the window itself, so EOXLABS leaves remote access off.
  3. The isolation pattern goes in where it fits. In the isolation pattern, a small script in a sandboxed iframe sees every IPC message, encrypted with AES-GCM keys regenerated on each run, and can reject calls before they reach the core. That guards against a compromised frontend dependency. On Windows, ES modules don't load inside that iframe, so the script is inlined at build time.

Desktop tools for cybersecurity teams suit this model, because the capability files and the app manifest together state what each window can touch.

How do updates stay trustworthy?

Tauri's updater plugin requires a signature on every update: "This cannot be disabled." Keys come from tauri signer generate, the public key is embedded in the app's configuration, the private key is supplied to the build as an environment variable, and TLS is enforced in production. The documentation is blunt about the risk: lose the private key and installed apps can never receive another update. EOXLABS keeps that key in the CI secret store with an offline backup, and serves the static update manifest and signed artifacts over HTTPS from object storage.

Updater signing is separate from operating-system code signing. Distributing outside the Mac App Store needs a Developer ID Application certificate, and Tauri's macOS signing guide notes that notarization is required with that certificate and isn't available on a free Apple account. Two keys, two failure modes, both tracked in the release checklist.

How much smaller is a Tauri app?

Tauri's getting-started page says "a minimal Tauri app can be less than 600KB in size". Electron embeds Chromium and Node.js into its binary, so every Electron app carries its own browser engine. Electron's documentation publishes no comparable size figure, so this page doesn't quote one. The trade runs both ways: the bundled engine is why Electron behaves consistently across operating systems, and why Tauri, which inherits each system's webview, doesn't.

Tauri, Electron or native Swift?

Tauri 2ElectronNative Swift
RendererThe operating system's webviewChromium, bundled in each appSwiftUI and native controls
Native codeRust core; Swift and Kotlin in mobile pluginsNode.jsSwift throughout
PlatformsWindows, macOS, Linux, iOS, AndroidWindows, macOS, LinuxApple platforms only
Security defaultsCommands reach the interface through capabilities and permissionsContext isolation since 12.0.0 and renderer sandboxing since 20.0.0 (security checklist)Platform permission prompts; App Review on the App Store
Best fit at EOXLABSCross-platform tools that share a web interfaceApps that need identical rendering everywhereApple-first products with deep platform integration

When not to use Tauri

  • The interface must render identically on every operating system, or depends on Chromium-only behavior. Electron's bundled engine is worth its size there.
  • The product is Apple-first and needs widgets, extensions or the full SDK. Build it in Swift.
  • Nobody will own the Rust core. Every native feature passes through it.
  • Linux is a primary target and the interface relies on recent web features. WebKitGTK versions vary by distribution.
  • The app is the website in a window. An installable web app is cheaper to run and update.
  • The mobile build depends on a plugin without iOS or Android support. Tauri's 2.0 announcement said not every official plugin supported mobile; check each one before committing.
→

Related

+

More stack

Have a system that can’t go dark?

Start a project →