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
EDU›Tauri 2 — desktop · mobile in one codebase›Step 2

Step 2

Project setup

0 views

Project setup

Rust + Node + (optional) Android Studio. Some one-time install pain, then smooth.

1. Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh     # macOS / Linux
# Windows: https://rustup.rs
rustc --version    # 1.75+

2. Node + pnpm

pnpm --version || corepack enable

3. OS dependencies

OS Install
macOS xcode-select --install
Windows WebView2 Runtime
Linux sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev

4. create-tauri-app

pnpm create tauri-app
cd my-app
pnpm install

src/ (React) + src-tauri/ (Rust).

5. Dev

pnpm tauri dev

Desktop window appears with Vite HMR + Rust watch.

6. Layout

my-app/
├── src/
├── src-tauri/
│   ├── Cargo.toml
│   ├── src/main.rs
│   ├── tauri.conf.json
│   └── capabilities/default.json
├── package.json
└── vite.config.ts

7. tauri.conf.json

{
  "productName": "my-app",
  "identifier": "com.example.myapp",
  "app": { "windows": [{ "title": "my-app", "width": 1000, "height": 700 }] },
  "build": { "frontendDist": "../dist", "devUrl": "http://localhost:5173" },
  "bundle": { "active": true, "targets": "all" }
}

identifier is in com.yourdomain.appname form. Fix it early; it's hard to change later.

8. Build (desktop)

pnpm tauri build

Produces .dmg / .msi / .deb / .AppImage. Code signing is a separate step per OS.

Closing

The first Rust compile takes 3–10 min. Subsequent builds are 30 s – 1 min from cache. Be patient on day one, iteration is fast after.

Next

  • 03-ipc-command-event

← Step 1

Why Tauri — vs Electron

Step 3 →

IPC — command / event