원클릭으로
tauri-app
// Bootstrap Tauri desktop applications with Rust backend and web frontend. Use when creating cross-platform desktop apps, Electron alternatives, or when the user wants a native desktop application with web technologies.
// Bootstrap Tauri desktop applications with Rust backend and web frontend. Use when creating cross-platform desktop apps, Electron alternatives, or when the user wants a native desktop application with web technologies.
Build full-stack React applications with TanStack Start, React Query, shadcn/ui, and Tailwind CSS v4. Use when working on projects created with create-tanstack-start-shadcn, or when the user needs help with TanStack Start patterns, server functions, React Query integration, or shadcn/ui components.
Bootstrap new projects with modern tech stacks. Use when creating new applications, setting up projects, initializing codebases, or when the user mentions project setup, scaffolding, or bootstrapping. Supports TanStack Start + shadcn (via npx create-tanstack-start-shadcn), Rust, Tauri, TanStack Router, Python, and C# .NET projects.
Bootstrap C# .NET projects with modern tooling. Use when creating .NET applications, Web APIs, console apps, Blazor apps, or when the user wants to set up a C# development environment.
Bootstrap Python projects with virtual environments and modern tooling. Use when creating Python applications, scripts, APIs, data science projects, or when the user wants a properly configured Python development environment.
Bootstrap Rust projects with Cargo. Use when creating Rust applications, CLI tools, libraries, or when the user wants to set up a new Rust codebase with best practices.
Bootstrap React projects with TanStack Router for type-safe file-based routing. Use when creating React SPAs, modern web applications with routing, or when the user wants type-safe navigation in React.
| name | tauri-app |
| description | Bootstrap Tauri desktop applications with Rust backend and web frontend. Use when creating cross-platform desktop apps, Electron alternatives, or when the user wants a native desktop application with web technologies. |
Creates cross-platform desktop applications using Tauri v2 with Rust backend and your choice of frontend framework.
# Check Rust
rustc --version && cargo --version
# Check Node.js (for frontend)
node --version && npm --version
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev \
build-essential \
curl \
wget \
file \
libxdo-dev \
libssl-dev \
libayatana-appindicator3-dev \
librsvg2-dev
xcode-select --install
# Interactive setup
npm create tauri-app@latest
# Or with specific options
npm create tauri-app@latest PROJECT_NAME -- --template react-ts
| Template | Description |
|---|---|
vanilla | Plain HTML/CSS/JS |
vanilla-ts | TypeScript without framework |
react | React with JavaScript |
react-ts | React with TypeScript |
vue | Vue 3 with JavaScript |
vue-ts | Vue 3 with TypeScript |
svelte | Svelte with JavaScript |
svelte-ts | Svelte with TypeScript |
solid | SolidJS with JavaScript |
solid-ts | SolidJS with TypeScript |
next | Next.js |
nuxt | Nuxt 3 |
leptos | Rust Leptos (full Rust stack) |
yew | Rust Yew (full Rust stack) |
npm create tauri-app@latest my-app -- --template react-ts
cd my-app
npm install
my-tauri-app/
├── src/ # Frontend source
│ ├── App.tsx
│ ├── main.tsx
│ └── styles.css
├── src-tauri/ # Rust backend
│ ├── src/
│ │ ├── main.rs # Entry point
│ │ └── lib.rs # Commands and logic
│ ├── Cargo.toml
│ ├── tauri.conf.json # Tauri configuration
│ ├── capabilities/ # Permission capabilities
│ └── icons/ # App icons
├── package.json
├── vite.config.ts
└── tsconfig.json
Key settings to configure:
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "My App",
"version": "0.1.0",
"identifier": "com.yourcompany.myapp",
"build": {
"frontendDist": "../dist"
},
"app": {
"windows": [
{
"title": "My App",
"width": 1200,
"height": 800,
"resizable": true,
"fullscreen": false
}
],
"security": {
"csp": null
}
},
"bundle": {
"active": true,
"targets": "all",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/128x128@2x.png",
"icons/icon.icns",
"icons/icon.ico"
]
}
}
use tauri::Manager;
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
#[tauri::command]
async fn perform_action(app: tauri::AppHandle) -> Result<String, String> {
// Async command example
Ok("Action completed".to_string())
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![greet, perform_action])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
import { invoke } from "@tauri-apps/api/core";
async function callRust() {
const result = await invoke<string>("greet", { name: "World" });
console.log(result);
}
# Start development server
npm run tauri dev
# Build for production
npm run tauri build
# Generate icons from a source image
npm run tauri icon path/to/icon.png
Add these to src-tauri/Cargo.toml:
[dependencies]
tauri = { version = "2", features = [] }
tauri-plugin-shell = "2"
tauri-plugin-dialog = "2"
tauri-plugin-fs = "2"
tauri-plugin-http = "2"
tauri-plugin-notification = "2"
tauri-plugin-os = "2"
tauri-plugin-process = "2"
tauri-plugin-clipboard-manager = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
Create src-tauri/capabilities/default.json:
{
"$schema": "https://schema.tauri.app/config/2",
"identifier": "default",
"description": "Default capabilities for the app",
"windows": ["main"],
"permissions": [
"core:default",
"shell:allow-open",
"dialog:allow-open",
"dialog:allow-save",
"fs:allow-read",
"notification:default"
]
}
Create .github/workflows/ci.yml:
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies (Ubuntu)
if: matrix.platform == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install frontend dependencies
run: npm ci
- name: Build
run: npm run tauri build
tauri.conf.json with your app detailsnpm run tauri icon