Desktop application framework
- Building cross-platform desktop apps
- 🌐 Web technologies for UI (HTML, CSS, JavaScript, React, Vue, ...)
- 🦀 Rust for backend & system access
- Faster than Electron & Lower RAM usage
- No bundled Chromium
- No Node runtime
- Rust compiled to native binary
- Uses system WebView
- Zero HTTP overhead
Core Architecture
- Frontend wraps web UI in a desktop window
- Uses the OS’s native webview
- Frontend cannot directly access OS
- Frontend calls Rust commands
- Rust:
- Read/write files
- Call OS APIs
- Handle security-sensitive logic
**// App Startup:**
OS launches binary
↓
Rust main()
↓
Tauri runtime initializes
↓
Window created
↓
WebView created
↓
Frontend loaded
↓
IPC bridge ready
**// Running:**
Frontend (WebView)
↓ invoke()
IPC Message (JSON)
↓
Rust Command Handler
↓
Rust Logic (FS / DB / OS) -> OS APIs (File, DB, Window, System)
↓
Serialized Response
↓
JS Promise resolved
Storage
| Option |
Use Case |
| Files (JSON / MD) |
Notes, config |
SQLite (rusqlite) |
Structured data |
| Key-Value Store |
Settings |
| OS secure storage |
Tokens, secrets |
Project Structure
src/ # Frontend (React, Vue, etc.)
├─ main.tsx (React)
src-tauri/ # Rust + Tauri backend
├─ src/
│ ├─ main.rs
│ └─ commands.rs
├─ tauri.conf.json
Build Tauti app
Frontend Build
(Vite / Webpack)
↓
Static Assets (HTML / JS / CSS)
↓
Embedded into Rust Binary
↓
Rust Compilation
↓
Rust launches OS WebView
↓
Native App (.exe / .app / .deb)
↓
WebView loads local assets