codingstairs
NotesEDULifeContact
⌕Search⌘K
koen

Navigation

  • Intro
  • Blog
  • Life

Get in touch

Send without signing in. Add your email if you'd like a reply.

  • Leave a message anonymously →
  • ✉ warragon112@gmail.com
  • KakaoTalk Open Chat ↗

© 2026 codingstairs

  • Notes
  • EDU
  • Search
  • Life
  • Contact
  • Legal
  • RSS
  • GitHub
Notes›frontend

Tauri and Electron

Published 2026-04-28· Updated 2026-05-18·0 views

Tauri and Electron — Two Branches of Desktop Apps

The idea of building desktop apps with HTML/CSS/JS is not new. The two largest branches are Electron and Tauri, and although they look similar, their architectures are quite different.

1. About Electron

Electron is a framework GitHub built in 2013 for the Atom Editor. It was first called atom-shell, then renamed to Electron with 1.0 in 2016. It was transferred to the OpenJS Foundation in 2022. The license is MIT.

The structure is simple. Chromium + Node.js are bundled into a single binary, and a web app runs on top of it. The process model is one main process (Node) and N renderer processes (Chromium).

Well-known users include VS Code, Slack, Discord, Notion, and the Figma desktop app (formerly).

2. About Tauri

Tauri is a framework first released in 2020. 1.0 came in June 2022, and 2.0 in October 2024. The license is MIT/Apache-2.0. There is no company or foundation form; it runs on OpenCollective sponsorship + Tauri Programme within Commons Conservancy.

The structure is different. WebView already installed on the system + Rust core.

  • Windows: WebView2 (based on Microsoft Edge)
  • macOS: WKWebView (based on Safari)
  • Linux: WebKitGTK
  • From 2.0, Android (System WebView) and iOS (WKWebView)

3. Factual comparison

Item Electron Tauri
Core language C++/JS (Chromium + Node) Rust
UI engine Bundled Chromium OS WebView
Backend runtime Node.js bundled Rust or external sidecar
Bundle size (Hello World) tens to hundreds of MB a few to tens of MB
Memory Chromium-based OS WebView-based (usually smaller)
Auto update Squirrel-based Tauri Updater plugin
Security model nodeIntegration, contextIsolation options explicit capabilities
Mobile none 2.0+

Bundle size and memory differ depending on measurement method. The above are general Hello World numbers; real apps may shrink the gap.

4. Bundled Chromium vs OS WebView

Bundled Chromium (Electron):

  • Same render result on every OS. Debugging is consistent.
  • Security patches must be shipped by the app itself.
  • Disk and memory cost is high.

OS WebView (Tauri):

  • The OS takes responsibility for security patches.
  • Disk and memory usage is small.
  • Render differences exist across OSes (especially Linux's WebKitGTK).

5. Rust core and IPC

Tauri's backend is Rust functions. Expose them with #[tauri::command] and call from JS via invoke("name", args). Arguments and return values are serialized with serde to JSON.

#[tauri::command]
fn greet(name: String) -> String { format!("hi, {name}") }
import { invoke } from "@tauri-apps/api/core"
const msg = await invoke<string>("greet", { name: "world" })

6. Permission model (capabilities)

Tauri 2 has an explicit permission system. Declare in src-tauri/capabilities/*.json which window can call which plugin commands.

{
  "identifier": "default",
  "windows": ["main"],
  "permissions": [
    "core:default",
    "fs:allow-read-text-file",
    "dialog:allow-open"
  ]
}

Instead of broad permissions like Electron's nodeIntegration: true, allow them per command. Often discussed in the supply-chain attack context.

7. Plugin architecture

Most of Tauri's OS features are split into plugins.

  • tauri-plugin-fs — filesystem
  • tauri-plugin-dialog — file/message dialogs
  • tauri-plugin-sql — SQLite/MySQL/Postgres
  • tauri-plugin-store — key-value storage
  • tauri-plugin-notification — system notifications
  • tauri-plugin-updater — auto update
  • tauri-plugin-os, tauri-plugin-shell, etc.

Each plugin ships as a Rust crate + JS package pair.

8. Other candidates

Tool First release Model Notes
Electron 2013 bundled Chromium + Node Largest ecosystem.
NW.js (formerly node-webkit) 2011 bundled Chromium + Node Earlier than Electron.
Tauri 2020 OS WebView + Rust Small binary.
Wails 2019 OS WebView + Go Tauri's Go counterpart. v3 in progress.
Capacitor 2019, Ionic iOS/Android WebView Mobile-first. Has an Electron adapter.
Flutter 2017, Google Custom render engine (Skia/Impeller) Does not use a webview.
.NET MAUI / WinUI 2022 OS native C# camp.

The choice is a trade-off. When the most consistent rendering matters, Electron is discussed; when small distribution, OS integration, and supply-chain security matter, Tauri; when mobile is the top priority, Capacitor or Tauri 2.

9. Getting started with Tauri 2

# prerequisites
# Windows: WebView2 (mostly bundled with Windows 11), Visual Studio Build Tools
# macOS:   xcode-select --install
# Linux:   webkit2gtk, libgtk-3-dev, etc. (varies by distribution)

pnpm dlx create-tauri-app
cd my-app
pnpm install
pnpm tauri dev

10. Common pitfalls

The first build is slow — Rust dependencies compile from scratch. Minutes are common. Subsequent builds are incremental.

Linux WebKitGTK differences — the behavior of CSS, ServiceWorker, and IndexedDB sometimes differs between Chromium and WebKit2. Linux is widely reported to be the most divergent.

Missing permissions — plugin commands not registered in capabilities are rejected. Read the error message and update the capabilities JSON.

Missing WebView2 (Windows) — older Windows 10 may not have it pre-installed. Configure the installer to include the bootstrapper.

macOS notarization — Apple Developer ID signing and notarization are required for official distribution. Use Tauri Action or a separate CI step.

Node-dependent libraries — Node native modules that ran fine in Electron do not work inside Tauri's webview (no Node available). Replace such places with Rust commands or sidecars.

Auto-update keys — Updater requires a signed manifest. Losing the private key is the end of the update channel. Safe storage is the first step.

Closing thoughts

Setting aside the slow first build and Linux WebKit differences, Tauri's small distribution size and clarity of the permission model are major strengths. When Electron's consistent rendering is not strictly required, more flows are leaning to Tauri.

Next

  • i18n-korean-first
  • material3-tokens

We refer to the Tauri official site, Tauri 2 docs, Tauri GitHub, Electron official, Tauri Plugins, Wails, and Capacitor.

More in frontend

All in this category →
  • Dashboard widget uniformity — don''t leave 4 domains with 3 widgets
  • Admin UI — ResourceTable SSOT pattern
  • Page Loading UX
  • Native Integrations — OS Features
  • OCR · STT · TTS
  • SQLite — A Single-File DB for Local Apps