Desktop Apps with Electron & Tauri
A survey of shipping desktop apps with web technology — Electron's bundled Chromium versus Tauri's native webview and Rust backend.
Desktop Apps with Electron & Tauri
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- A desktop app needs things a browser tab deliberately can't have — a filesystem it can write to freely, a system tray icon, native menus, and the ability to run after the browser itself is closed.
- Electron solves this by bundling an entire Chromium browser and Node.js runtime inside your app, so every install ships its own browser — which is why Electron apps are reliably 100+ MB and each one runs its own separate copy of Chromium in memory.
- Tauri solves the same problem differently: instead of bundling a browser, it uses the operating system's own webview that's already installed, and pairs it with a Rust backend instead of Node — Tauri apps commonly ship as single-digit megabytes.
- Electron's bundled Chromium is also its biggest advantage — it renders identically on every OS, while Tauri's reliance on the OS webview means testing across WebKit (macOS), WebView2 (Windows), and WebKitGTK (Linux) separately.
- Tauri's backend is Rust, not JavaScript, so any native functionality you write yourself — not just UI — means picking up a second language, which is a real cost Electron's all-JavaScript stack doesn't impose.
Why a browser tab isn’t enough
A browser sandboxes web pages on purpose. A page you visit can’t read arbitrary files off your disk, can’t keep running once you close the tab, can’t sit in your system tray, and can’t register a global keyboard shortcut that works even when some other app has focus. That sandbox is what makes it safe to click links from strangers all day. But it also means a webpage can never be a real desktop app — Slack, VS Code, Figma’s desktop client, Discord — because those apps need exactly the things the sandbox denies: real file access, background persistence, OS-level integration.
The web developer’s dilemma, then: you already know HTML, CSS, and JavaScript, and you’d rather not learn an entirely separate native toolkit (Swift/AppKit, or C++/Qt, or C#/WinForms) just to ship a desktop app. Electron and Tauri are both answers to “how do I get my web app out of the sandbox and onto the desktop” — they just answer it in very different ways.
Electron: bring your own browser
Electron’s approach is almost brute-force simple: every Electron app bundles a full copy of Chromium — the same rendering engine behind Google Chrome — plus a full copy of Node.js, and ships both inside the app itself. Your HTML/CSS/JS renders inside that bundled Chromium, exactly like it would in a browser tab, except this time the Node.js process sitting alongside it has full filesystem access, can spawn native menus, and can do anything a desktop app needs to do. A thin bridge (Electron’s IPC layer) lets your UI code ask the Node side to do the privileged things the sandboxed browser code can’t do itself.
This is why Electron apps are reliably large — a baseline “hello world” Electron app is already in the 100+ MB range before you’ve added a single feature, because you’re not relying on anything already on the user’s machine. You’re shipping your own browser along with it. If a user has five Electron apps installed, they have five separate copies of Chromium sitting on disk, and five separate Chromium processes competing for memory when those apps are open.
That cost buys something real, though: consistency. Because every Electron app carries its own identical Chromium, your app renders exactly the same way on every user’s machine, on every OS, regardless of what browser that user happens to have installed or what OS-level webview version they’re running. That’s a meaningful reason large, UI-heavy apps like VS Code and Slack have stuck with it — predictable rendering across millions of installs is worth a lot.
Tauri: use what’s already there
Tauri starts from a different premise: the user’s operating system already has a capable web renderer installed, because every modern OS ships one for its own native apps and system UI — WebKit on macOS, WebView2 (built on Chromium) on Windows, WebKitGTK on Linux. So instead of bundling a second one, Tauri just points your app’s UI at the one that’s already there. Your frontend code — React, Vue, Svelte, whatever you’d normally build for the web — renders inside that OS-provided webview.
For the backend — the privileged side that gets filesystem access and native integration — Tauri doesn’t use Node. It uses Rust. Your app’s native-level logic, the commands your frontend calls into for anything privileged, are written and compiled as Rust functions, and the frontend talks to them through Tauri’s own command-invocation bridge, conceptually similar to Electron’s IPC but crossing into a compiled, statically-typed language rather than another JavaScript runtime.
Not shipping a bundled browser is why Tauri apps are dramatically smaller — commonly single-digit megabytes for the same kind of app that’d be 100+ MB in Electron — because the install is mostly just your own code, not a full copy of Chromium riding along with it.
The tradeoff that doesn’t go away
The size difference isn’t a free win for Tauri — it’s a direct trade against Electron’s consistency. Because Tauri relies on whatever webview the OS provides, your app can render or behave subtly differently across WebKit, WebView2, and WebKitGTK, the same way a website can render subtly differently across Safari, Chrome, and Firefox — because, fundamentally, that’s what’s happening. A CSS feature or JS API that works perfectly in your WebView2 testing on Windows might need a fallback on macOS’s WebKit. Electron sidesteps this entirely by never asking the question — it’s always Chromium, full stop.
The Rust-versus-Node choice is a second, separate tradeoff, and it’s about your team rather than your users. If your team is JavaScript end to end, Electron keeps the whole stack in one language — frontend and native backend both in JS. Choosing Tauri means any backend logic beyond calling pre-built commands means writing and maintaining Rust, a steeper, statically-typed, memory-managed language that’s a real skill investment if nobody on the team already has it.
Neither tool is strictly better — they’re optimized for different constraints. If install size and startup memory barely matter but rendering consistency across every user’s machine does, and your team is all-in on JavaScript, Electron’s bundled-browser approach is a reasonable default. If you’re shipping to users on slow connections or limited disk, or you want a smaller attack surface and don’t mind picking up Rust, Tauri’s bet on the OS’s own webview is the one worth making.
Check yourself
What can a desktop app do that a regular browser tab is deliberately prevented from doing?
A desktop app can read and write arbitrary files on the user's disk, keep running after being closed to the system tray, register global keyboard shortcuts, and integrate with native OS menus — capabilities a browser sandboxes away from web pages for security reasons.
Why are Electron apps so much larger on disk than the equivalent Tauri app?
Electron bundles an entire copy of Chromium and Node.js inside every single app it ships, so each installed app carries its own full browser engine; Tauri instead reuses the webview the operating system already has installed, shipping only your app's own code.
What's the practical downside of Tauri's approach of using the OS's native webview instead of bundling its own?
Because the rendering engine differs by platform — WebKit on macOS, WebView2 on Windows, WebKitGTK on Linux — a Tauri app can render or behave slightly differently across operating systems in ways an Electron app, which carries one identical Chromium everywhere, does not.
If a team's entire stack is JavaScript and they need to add custom native functionality to their desktop app, why might that push them toward Electron over Tauri?
Electron's backend runtime is Node.js, so native-level code stays in JavaScript the team already knows; Tauri's backend is Rust, so the same native functionality means learning and maintaining a second language the team may not already have in-house.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.