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

From Zero with create-tauri-app

~13 min · tauri, cli, scaffold, setup

Level 0Web Tourist
0 XP0/56 lessons0/13 achievements
0/100 XP to next level100 XP to go0% complete
"The fastest way to understand a framework is to let it generate a working app, then read what it gave you."

One Command, A Working App

create-tauri-app is the official scaffolder. It asks a few questions — app name, frontend framework (vanilla, React, Vue, Svelte, Solid, Angular…), and package manager — then generates a project that already builds and runs. You don't wire anything by hand for the happy path; you get a frontend, a Rust core, a config, and a window that opens.

Already have a frontend? You don't have to start over. tauri init adds the src-tauri/ half to an existing web project, so you can bolt Tauri onto a React app you already love. Either way, the mental model from the Foundations track is now a real folder you can poke.

Prerequisites: the part people skip

Tauri compiles real native code, so you need a Rust toolchain (install via rustup) plus your platform's build dependencies: Xcode Command Line Tools on macOS, WebView2 + the MSVC build tools on Windows, and WebKitGTK + a few system libs on Linux. The official Prerequisites page lists the exact packages per OS — do that once and the first build just works. Skipping it is the #1 reason a first tauri dev errors out.

The First Run Is Slow — On Purpose

Your very first npm run tauri dev compiles the entire Rust dependency tree, which can take minutes. That's a one-time cost; subsequent runs are incremental and fast. Don't panic when the first build chews on your CPU — it's building a real native binary, not bundling JavaScript.

Code

Scaffold and run·bash
# Scaffold a fresh Tauri 2 app — pick whichever package manager you use.
npm create tauri-app@latest
# pnpm create tauri-app
# yarn create tauri-app
# bun create tauri-app
# Rust: cargo install create-tauri-app && cargo create-tauri-app

cd my-app
npm install
npm run tauri dev   # first run compiles Rust — go get coffee, then it's fast
tauri init — bolt it onto what you have·bash
# Adding Tauri to an EXISTING web app instead of starting fresh:
npm install -D @tauri-apps/cli@latest
npx tauri init    # interactive: app name, window title, frontendDist, devUrl
# Now you have a src-tauri/ next to your existing frontend.

External links

Exercise

Actually scaffold one. Run create-tauri-app, pick the React + TypeScript template, install, and get npm run tauri dev to open a window. When it opens, edit a line of the frontend and watch it hot-reload inside the native window. You now have a real Tauri app to experiment with for the rest of this quest.
Hint
If the first build errors, it's almost always a missing prerequisite — re-check the Prerequisites page for your OS (Xcode CLT on macOS, WebView2/MSVC on Windows, webkit2gtk on Linux). The error message usually names the missing piece.

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.