tauri
БесплатноБез исполняемых скриптовНе проверенTauri builds desktop and mobile apps from a web frontend and a Rust backend, rendering the UI in the operating system's webview instead of a bundled Chromium…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Tauri
Overview
Tauri is a framework for building cross-platform desktop and mobile applications using any web framework for the frontend and Rust for the backend. The UI runs in the system webview (WebView2 on Windows, WKWebView on macOS and iOS, WebKitGTK on Linux), so no browser engine is shipped with the app. The frontend talks to Rust through commands (request/response), events and channels (push), and every native API it may reach has to be granted in a capability file.
This skill covers Tauri v2. A v1 project (tauri.conf.json with an allowlist) is migrated with npm run tauri migrate. For installing and pinning the Rust toolchain itself, use the rust skill.
Instructions
Prerequisites
Tauri 2.12 requires Rust 1.90 or newer plus the platform's webview toolchain:
# Debian / Ubuntu (22.04 or newer: Tauri v2 needs WebKitGTK 4.1)
sudo apt update
sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
On macOS run xcode-select --install (full Xcode only for iOS targets). On Windows install the Microsoft C++ Build Tools ("Desktop development with C++") and make sure the MSVC Rust toolchain is the default (rustup default stable-msvc). WebView2 ships with Windows 10 1803 and later. npm run tauri info prints what is missing.
Create a project
npm create tauri-app@latest markdown-notes -- --template react-ts --manager npm --identifier io.inkwell.notes
cd markdown-notes
npm install
npm run tauri dev # compiles the Rust side and opens the window with hot reload
Templates: vanilla, vue, svelte, react, solid, preact (each with a -ts variant), angular, and the Rust frontends yew, leptos, sycamore, dioxus. To add Tauri to an existing frontend instead, run npm install -D @tauri-apps/cli@latest and npx tauri init; it asks for the dev server URL and the build command and creates src-tauri/.
The CLI is the same whichever way it is started: npm run tauri dev, pnpm tauri dev, bun tauri dev, or cargo tauri dev after cargo install tauri-cli --version "^2.0.0" --locked. With npm, flags for the CLI go after -- (npm run tauri build -- --debug).
Project layout
src-tauri/ # next to the frontend's package.json and src/
├── Cargo.toml # tauri, tauri-build, tauri-plugin-* crates
├── build.rs # tauri_build::build()
├── tauri.conf.json # identifier, windows, build commands, bundle, plugin config
├── capabilities/default.json # what the frontend is allowed to call
└── src/
├── lib.rs # app code: commands, plugins, setup — edit this
└── main.rs # desktop entry point that calls lib's run(); leave as is
App code lives in lib.rs because mobile builds load the app as a library. tauri.conf.json v2 keys: build.devUrl, build.frontendDist, build.beforeDevCommand, build.beforeBuildCommand, app.windows, app.security, bundle, plugins. A tauri.linux.conf.json, tauri.windows.conf.json or tauri.macos.conf.json next to it is merged on that platform; arrays are replaced, not appended.
Commands: call Rust from the frontend
// src-tauri/src/lib.rs
#[tauri::command]
fn word_count(note_text: String) -> usize {
note_text.split_whitespace().count()
}
#[tauri::command]
async fn parse_port(input: String) -> Result<u16, String> {
input.trim().parse::<u16>().map_err(|e| e.to_string())
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![word_count, parse_port])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
import { invoke } from "@tauri-apps/api/core";
const words = await invoke<number>("word_count", { noteText: "Ship the release notes" }); // 4
const port = await invoke<number>("parse_port", { input: "80800" }); // rejects with the Err string
- Argument keys are camelCase in JavaScript (
noteText) for snake_case Rust parameters (note_text); use#[tauri::command(rename_all = "snake_case")]to keep snake_case on both sides. - Arguments must implement
serde::Deserialize, return values and errorsserde::Serialize. Most library error types such asstd::io::Errordo not, so map them toStringor define an error enum withthiserrorand a manualSerializeimpl. - Only the last
invoke_handlercall counts: list every command in onegenerate_handler![…]. - Commands in
lib.rsmust not bepub; commands in another module must bepuband are registered asnotes::word_count. Names are global, not scoped by module. - A command without
asyncruns on the main thread; declare long workasync. An async command cannot take borrowed arguments such as&strorState<'_, T>unless it returns aResult. - For large binary payloads
Установить tauri в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл tauri?
Tauri builds desktop and mobile apps from a web frontend and a Rust backend, rendering the UI in the operating system's webview instead of a bundled Chromium. Use when creating or extending a Tauri v2 app: scaffolding with create-tauri-app, writing Rust commands and calling them with invoke, pushing events or channel data to the frontend, adding plugins, fixing "not allowed" permission errors in capabilities, bundling installers, or shipping signed auto-updates. Trigger words: tauri, tauri v2, tauri command, tauri plugin, capabilities, system webview, rust desktop app.
Как установить скилл tauri?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tauri запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic