Lab / Essay
Desktop and mobile apps
The argument for Tauri 2
Why our next desktop apps get a Rust core and the system web view instead of a bundled browser, what moving a real Electron app taught us, and where Tauri still costs you.
For years the default answer to "how do I ship my web app as a desktop app" has been Electron, and it earned that place. It is mature, well documented, and it renders the same everywhere because it brings its own copy of Chromium. Most of the desktop apps on your machine probably run on it.
Our new desktop apps start on Tauri 2 instead, and we are moving our biggest Electron app, the Iblis studio, across. This is the case for that choice, with the numbers we measured on the way, including the ones that did not flatter Tauri.
What Tauri actually is
Tauri is a framework for building desktop and mobile apps with a web front end and a Rust back end. Two design decisions set it apart from Electron:
- It uses the web view the operating system already has instead of bundling a browser: WebView2 on Windows, WKWebView on macOS and iOS, WebKitGTK on Linux, and the system WebView on Android. Your HTML, CSS and JavaScript run in that.
- The native side is Rust, not Node.js. Anything the page cannot do itself, such as reading files, opening dialogs, talking to hardware or running a model, is a Rust command the page has to be explicitly allowed to call.
Version 2, stable since October 2024, added iOS and Android to the same project and rebuilt the security model around capabilities. Those two changes are most of this argument.
1. Security you can read in one file
In Electron the renderer is a Chromium page and the main process is Node.js with full access to the machine. Modern Electron isolates them sensibly by default (context isolation, sandboxed renderers), and you expose native features through a preload script. It works, but the boundary is code you write and review by hand, and one careless bridge function can hand the page much more than you meant to.
Tauri 2 makes the boundary data. Every plugin command is denied until a capability file grants it, and a capability names which windows it applies to. Your own commands can sit under the same access list, which is what we did. The whole attack surface of the Iblis shell's main window is one short file, in this shape:
{
"identifier": "main",
"windows": ["main"],
"permissions": [
"core:event:allow-listen",
"core:window:allow-start-dragging",
"allow-window-minimize",
"allow-window-close"
]
}
The real one has eleven grants, every one with a named caller in the code, and no file-system, shell, HTTP or updater permission at all. A dialog command and a secrets command exist in the binary but are not granted to any window, so the page cannot reach them. A build step fails if a grant points at a command that does not exist, so the list cannot rot quietly.
A second window that shows a migration wizard has its own capability with only the eight commands it needs, and those commands also refuse to run for any window but that one. Capabilities can also be scoped to remote URLs, which matters more than it sounds: Tauri treats a custom URL scheme as a remote origin, so you have to grant it on purpose.
The updater is a good example of the model doing its job. Only Rust ever sees the installer bytes between download and install; the page gets an opaque handle. So we simply never grant the page the install permission, and it cannot skip our own signature check even if something goes wrong in the front end. Tauri's own update signature is mandatory and cannot be turned off, so every update carries two signatures, ours and Tauri's.
Add a strict content security policy in the config (ours allows scripts only from the app itself) and you can review the security of the whole shell in an afternoon.
2. Smaller downloads, and the honest asterisk
Not shipping a browser saves a lot. On the same Windows laptop, for the same version of Iblis:
| Electron | Tauri 2 | |
|---|---|---|
| Installer | 111.1 MiB | 34.2 MiB (3.2x smaller) |
| Installed on disk | 393.4 MiB, 81 files | 141.2 MiB, 6 files (2.8x smaller) |
| Memory at idle, all processes | 225.7 MiB | 242.3 MiB |
The asterisk: 89.6 MiB of the Tauri install is a Node.js runtime that the music engine still needs, so most of the saving is the browser we stopped bundling, not a lean app. A shell with no engine is tiny. Our app template builds to a 2.4 MiB installer, and Audeiux, the second app built on the same shell, ships as a 2.9 MiB installer.
Memory is about the same, slightly worse for Tauri at idle. The web view is still a browser engine; it is just one the system shares. Do not choose Tauri to save RAM.
On Linux the picture changes. An AppImage has to carry its own WebKitGTK to run on most distributions, so it came out at about 128 MiB, while the .deb, which uses the distribution's copy, is about 62 MiB.
3. One Rust core, more places it can run
The real reason we moved Iblis is the core, not the shell. All the app's logic now lives in a Rust workspace with more than two thousand tests, and the front end talks to it through a typed client. The old Electron app had 132 request channels between the page and the main process; all of them now have a Rust handler, and a test pins the whole channel table so the two sides cannot drift.
That core does not care what is in front of it. The same project builds a desktop app today, and Tauri 2's mobile support means a phone can become a remote control for the desktop that does the heavy work, from the same code base. We have not shipped that yet, and we will not claim it works until it does, but it is a door Electron does not have.
It also made a second app cheap. We split the Tauri shell into a reusable piece with a one-command "new app" recipe, and the next app was a few megabytes and a passing smoke test away.
4. One front end, web and desktop
A Tauri front end is a normal web front end. The same components, styles and build tools serve a website and the desktop app, and most of what you know about building for the browser carries straight over. That was already true of Electron; Tauri keeps it while dropping the bundled browser.
One design rule made this work for us: the page talks to the Rust core over local HTTP and WebSocket with a per-launch token, and Tauri's own IPC is used only for genuinely native things like windows and dialogs. Tauri's documentation is clear that its event system is not built for high throughput, so progress goes on channels and bulk data goes through ordinary responses and media URLs.
What it cost us
A fair argument includes the bill. These are the things that hurt, all of them real, most of them fixed:
- Three web views means three sets of differences. Against Electron, WebView2 on Windows matched to within a quarter of a percent on all 17 screens we compare. WebKitGTK on Linux was 3 to 8 percent off: taller native drop-downs, different font fallback and antialiasing. Eleven font issues surfaced only there.
- Custom URL schemes look different per platform. A media scheme is
scheme://on WebKit andhttp://scheme.localhoston WebView2 and Android. Our player read the host name as a track id and got stuck on "Loading audio" on Windows until we fixed the front end. - Linux audio in the web view refused to play in our test environment, even a tiny WAV that the system's media stack played fine. Linux playback is still not verified end to end.
- The first cold start was much slower. First screen took 2.9 s against Electron's 0.4 s on Windows. About 0.35 to 0.4 s of that is creating the WebView2 environment, which even a bare hello-world pays. The rest was ours: asking the bundled Node for its version on every launch, eager hardware probes that woke the discrete GPU, and starting the core before the window instead of beside it. With those fixed the window shows in about half a second. We do not claim it opens sooner than Electron.
- Your saved settings do not come along for free. Browser storage is keyed by origin, and Electron serves from
file://while Tauri on Windows serves fromhttp://tauri.localhost, so no web-view setting can carry them over. Tauri also picks its data folder from the app identifier. We moved preferences into a file the core owns and pointed the core at the existing profile; every on-disk format has a byte-for-byte round-trip test against what the old app wrote. Saved API keys sat in Electron's encrypted storage, so users re-enter them once. - Small surprises in plugins. With the dialog plugin,
window.confirmbecomes asynchronous and returns a Promise that is always truthy, so two destructive actions briefly ran without asking. We moved those confirmations into native dialogs in Rust. - Testing tools are thinner. The Playwright suites that drive Electron do not carry over. Tauri's WebDriver works on Windows and Linux; macOS and mobile need other routes.
- Sidecar processes need care. Helpers started next to the app are cleaned up on a clean exit, but not on a crash or an update restart, so we contain them ourselves.
- Unsigned builds get warnings, exactly as with Electron. The framework does not change what Windows thinks of an unknown publisher.
When to stay on Electron
- Your app depends on pixel-identical rendering on every OS, or on a Chromium-only web API.
- Your team knows Node.js well and nobody wants to own Rust code.
- Your test suite is built on driving Electron, and rewriting it is not worth the gain.
- Cold start on Windows is your headline metric and you cannot spend time tuning it.
The argument, in one paragraph
Tauri 2 gives you a security boundary written down as data instead of scattered through code, downloads a fraction of the size, a Rust core you can test hard and reuse, one project for desktop and mobile, and the same web front end you would build anyway. It costs you rendering differences between platforms, some tooling you had for free in Electron, and a careful migration of anything the old app stored. For new apps we think that is an easy trade. For an existing app it is a real project, and worth doing when the core is what you actually want to keep for the next ten years.
Numbers measured by us in November 2026 on preview builds of Iblis; they are not a benchmark of Tauri in general. Iblis on Tauri is not released yet, and the Electron edition stays available alongside it.
More from the lab