Loading...
Loading...
Helps users create and initialize new Tauri v2 projects for building cross-platform desktop and mobile applications. Covers system prerequisites and setup requirements for macOS, Windows, and Linux. Guides through project creation using create-tauri-app or manual Tauri CLI initialization. Explains project directory structure and configuration files. Supports vanilla JavaScript, TypeScript, React, Vue, Svelte, Angular, SolidJS, and Rust-based frontends.
npx skill4agent add dchuk/claude-code-tauri-skills setting-up-tauri-projects# For desktop + iOS development
# Install Xcode from Mac App Store
# For desktop-only development (lighter option)
xcode-select --installwinget install Rustlang.Rustup
rustup default stable-msvcsudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-devsudo pacman -S webkit2gtk-4.1 base-devel curl wget file openssl \
appmenu-gtk-module libappindicator-gtk3 librsvg xdotoolsudo dnf install webkit2gtk4.1-devel openssl-devel curl wget file \
libappindicator-gtk3-devel librsvg2-devel libxdo-devel \
@development-tools# macOS/Linux
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Windows (PowerShell)
winget install Rustlang.Rustup# Install Android Studio, then add Rust targets
rustup target add aarch64-linux-android armv7-linux-androideabi \
i686-linux-android x86_64-linux-androidJAVA_HOMEANDROID_HOMENDK_HOME# Requires full Xcode (not just Command Line Tools)
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
# Install Cocoapods
brew install cocoapods# npm
npm create tauri-app@latest
# pnpm
pnpm create tauri-app
# yarn
yarn create tauri-app
# bun
bun create tauri-app
# cargo (no Node.js required)
cargo install create-tauri-app --locked
cargo create-tauri-app
# Shell scripts
sh <(curl https://create.tauri.app/sh) # Bash
irm https://create.tauri.app/ps | iex # PowerShellcom.example.appcd your-project
npm install
npm run tauri dev# 1. In your existing project, install Tauri CLI
npm install -D @tauri-apps/cli@latest
# 2. Initialize Tauri (creates src-tauri directory)
npx tauri inithttp://localhost:5173distnpm run devnpm run build# 3. Start development
npx tauri devmy-tauri-app/
├── package.json # Frontend dependencies
├── index.html # Frontend entry point
├── src/ # Frontend source code
│ └── main.js
└── src-tauri/ # Rust backend
├── Cargo.toml # Rust dependencies
├── Cargo.lock
├── build.rs # Tauri build script
├── tauri.conf.json # Main Tauri configuration
├── capabilities/ # Permission/capability definitions
├── icons/ # App icons (all formats)
└── src/
├── lib.rs # Main Rust code + mobile entry point
└── main.rs # Desktop entry point{
"productName": "my-app",
"version": "0.1.0",
"identifier": "com.example.my-app",
"build": {
"devUrl": "http://localhost:5173",
"frontendDist": "../dist"
},
"app": {
"windows": [{ "title": "My App", "width": 800, "height": 600 }]
}
}#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.run(tauri::generate_context!())
.expect("error while running tauri application");
}#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
app_lib::run();
}{
"identifier": "main-capability",
"windows": ["main"],
"permissions": ["core:default"]
}# Development with hot reload
npm run tauri dev
# Build production binary
npm run tauri build
# Generate app icons from source image
npm run tauri icon path/to/icon.png
# Add Android target
npm run tauri android init
# Add iOS target
npm run tauri ios init
# Run on Android
npm run tauri android dev
# Run on iOS simulator
npm run tauri ios dev| Template | Languages | Notes |
|---|---|---|
| vanilla | JS, TS | No framework |
| react | JS, TS | Vite-based |
| vue | JS, TS | Vite-based |
| svelte | JS, TS | Vite-based |
| solid | JS, TS | Vite-based |
| angular | TS | Angular CLI |
| preact | JS, TS | Vite-based |
| yew | Rust | Rust WASM frontend |
| leptos | Rust | Rust WASM frontend |
| sycamore | Rust | Rust WASM frontend |