C.W.K.
Stream
Lesson 01 of 06 · published

What Tauri Actually Is

~12 min · tauri, architecture, webview, rust

Level 0Web Tourist
0 XP0/56 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete
"The lightest app is the one you didn't have to ship."

The Browser Is Already There

Every modern OS already has a web rendering engine baked in. macOS and iOS have WebKit (WKWebView). Windows 10 and 11 ship WebView2 (Chromium-based, maintained by Microsoft). Most Linux desktops have WebKitGTK. Your user's machine can already render HTML, run JavaScript, and paint CSS — today, with zero help from you.

Electron's bet was: don't trust the local engine, ship your own. So every Electron app carries a full copy of Chromium (~150MB) plus a Node.js runtime. Five Electron apps open means five Chromiums in RAM. Tauri's bet is the opposite: borrow the engine that's already installed. Ship only your HTML/CSS/JS plus a small native binary that knows how to open a window and point the system webview at your UI.

Two Halves, One App

A Tauri app is two things living together:

  • The core — a native process compiled from Rust. It owns the window, the filesystem, the network, the OS. This is where privileged, fast, or platform-specific work happens.
  • The webview — the OS's own rendering engine, showing your frontend. React, Svelte, Vue, or plain HTML — Tauri genuinely does not care which.

They never share memory. They talk by passing messages across an IPC bridge. The webview asks the core to do native things ("read this file," "save this image"); the core answers. That message boundary is the spine of everything in this quest.

Why "Rust" Shouldn't Scare You

You don't need to be a Rust expert to ship a Tauri app. For a huge class of apps, the Rust you write is a handful of small functions exposed to the frontend. The bridge track hands you exactly the Rust survival kit you need — and Rust gets its own full quest at /cwk-quests/rust-quest when you want to go deeper than survival.

Code

main.rs — two lines is a whole native app·rust
// src-tauri/src/main.rs — the entire native entry point of a desktop app.
// Yes, really. The interesting code lives in lib.rs so mobile can share it.
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

fn main() {
    app_lib::run();
}
Cargo.toml — the dependency that makes it Tauri·toml
# src-tauri/Cargo.toml — the native side is just a Rust crate.
# `tauri = "2"` pulls in the whole framework; features turn on extras.
[dependencies]
tauri = { version = "2", features = [] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"

External links

Exercise

Open Activity Monitor (macOS) or Task Manager (Windows). Find a running Electron app — VS Code, Slack, Discord, and Notion are all Electron. Note its memory footprint and how many helper processes it spawns. Then write one sentence: for the app YOU want to build, is shipping your own browser worth that cost, or would borrowing the OS webview be the better trade?
Hint
There's no universally right answer — it's a trade. You're practicing the judgment, not finding the 'correct' framework. Notice the per-app RAM and the number of 'Helper' processes.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.