Skip to content
Skills Library
Programming · Building & coding

tauri

/tauri

Expert Tauri assistance covering Rust core backend, web frontend, secure IPC commands, and multi-platform packaging. Use when building lightweight, secure, native desktop/mobile apps.

Licence
MIT
Last repository change
01.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 01.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Expert Tauri assistance covering Rust core backend, web frontend, secure IPC commands, and multi-platform packaging. Use when building lightweight, secure, native desktop/mobile apps.

Original author description

Expert Tauri assistance covering Rust core backend, web frontend, secure IPC commands, and multi-platform packaging. Use when building lightweight, secure, native desktop/mobile apps.

How it works

  1. When to Use
  2. Quick Start
  3. Core Concepts
  4. Common Patterns
  5. Best Practices
  6. Troubleshooting
  7. References
Original SKILL.md headings · 173 lines, 585 words
SKILL.md preview
---
name: tauri
description: Expert Tauri assistance covering Rust core backend, web frontend, secure IPC commands, and multi-platform packaging. Use when building lightweight, secure, native desktop/mobile apps.
---

# Tauri

Tauri allows building desktop (and now mobile in v2.0) apps using web technologies. It differs from Electron by using the **OS Native Webview** (WebView2 on Windows, WebKit on macOS/Linux).

## When to Use

- **Lightweight Cross-Platform Desktop Apps**: Building native macOS, Windows, and Linux apps using web frontends and Rust backends.
- **Tauri v2 Mobile & Desktop Support**: Compiling unified codebases to iOS, Android, and desktop.
- **Memory-Efficient Desktop Software**: Tiny binary size (< 10MB) and low memory usage utilizing the system webview.
- **High-Security Desktop Environments**: Strict IPC permissions, cryptographic signature verification, and zero Node runtime.

## Quick Start

```rust
// src-tauri/src/main.rs
#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}! You've been greeted from Rust!", name)
}

fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
```

```javascript
// frontend app.js
import { invoke } from "@tauri-apps/api/core";
const greeting = await invoke("greet", { name: "World" });
```

## Core Concepts

### Rust Command Handlers with #[tauri::command]

Exposing high-performance native Rust functions to the webview:

```rust
// src-tauri/src/lib.rs
use serde::{Deserialize, Serialize};

#[derive(Serialize, Deserialize)]
pub struct SystemStats {
    cpu_cores: usize,
    os_name: String,
}

#[tauri::command]
fn get_system_stats() -> Result<SystemStats, String> {
    Ok(SystemStats {
        cpu_cores: num_cpus::get(),
        os_name: std::env::consts::OS.to_string(),
    })
}

pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![get_system_stats])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
```

### Invoking Rust Commands from Frontend

Type-safe frontend IPC invocation:

```typescript
// src/services/system.ts
import { invoke } from "@tauri-apps/api/core";

interface SystemStats {
  cpu_cores: number;
  os_name: string;
}

export async function fetchSystemMetrics(): Promise<SystemStats> {
  try {
    const stats = await invoke<SystemStats>("get_system_stats");
    console.log(`Running on ${stats.os_name} with ${stats.cpu_cores} cores`);
    return stats;
  } catch (error) {
    console.error("Failed to invoke Tauri command:", error);
    throw error;
  }
}
```

### Tauri v2 Permissions & Capabilities System

Configuring granular security rules for plugins and commands:

```json
// src-tauri/capabilities/main.json
{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "main-capability",
  "description": "Capability for the main window",
  "windows": ["main"],
  "permissions": [
    "core:default",
    "fs:allow-read-text-file",
    "dialog:allow-open",
    "notification:allow-notify"
  ]
}
```

## Common Patterns

### Typed IPC Invocation with Serde Structs

**Problem**: Passing structured parameters and receiving typed errors across the Rust-to-JS bridge.

**Solution**:
Serialize payloads with serde:

```rust
use serde::{Deserialize, Serialize};

#[derive(Deserialize)]
struct LoginRequest {
    username: String,
    auth_token: String,
}

#[derive(Serialize)]
struct UserSession {
    user_id: u64,
    display_name: String,
}

#[tauri::command]
async fn authenticate(req: LoginRequest) -> Result<UserSession, String> {
    if req.auth_token == "valid" {
        Ok(UserSession { user_id: 1, display_name: req.username })
    } else {
        Err("Authentication failed".into())
    }
}
```

## Best Practices

**Do**:

- Target Tauri v2 with explicit capability and permission manifests for least privilege access.
- Handle heavy computation and filesystem operations in Rust, keeping the webview UI smooth and responsive.
- Configure code signing and automated updates using Tauri's built-in updater plugin.
- Use `@tauri-apps/api/core` for modern Tauri v2 frontend bindings.

**Don't**:

- Pass large binary files across the IPC bridge as base64 strings; use custom protocol streaming.
- Grant wildcard permissions (`fs:allow-all`) in capability files.
- Block the main Tauri thread; use async Rust commands for I/O operations.

## Troubleshooting

| Error                                              | Cause                                                          | Solution                                                               |
| :------------------------------------------------- | :------------------------------------------------------------- | :--------------------------------------------------------------------- |
| `Command ... not found in invoke handler`          | Command function omitted from `tauri::generate_handler![...]`. | Register the command name in `generate_handler![my_cmd]`.              |
| `Tauri build fails: WebView2 / WebKit2GTK missing` | Missing system webview libraries on Linux or Windows.          | Install `libwebkit2gtk-4.1-dev` (Linux) or WebView2 runtime (Windows). |
| `Permission denied calling plugin API in Tauri v2` | Capabilities permission file not granting access to plugin.    | Add plugin permissions in `src-tauri/capabilities/default.json`.       |

## References

- [Tauri Documentation](https://tauri.app/)

Versions

RepositoryScoreLicence
This page · G1Joshi/Agent-Skills100MIT
TerminalSkills/skills100Apache-2.0
ericrisco/rsc-harness100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT

Database snapshot: 13.11.2026 · package version 1aa4c3130fb0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100tauri-desktop
    Tauri 2.0 project setup, Rust backend + web frontend, plugin system, IPC commands, security model, auto-update, and mobile support. Use when building lightweight cross-platform desktop or mobile apps with Tauri.
  • 100tauri-expert
    Expert in Tauri framework, Rust backend, web frontend integration, and lightweight desktop applications. Use when the user mentions desktop, Rust, web, cross platform, or performance, or when the task involves Tauri Architecture, Tauri vs Electron, Core Components, or Security Features.
  • 95desktop-tauri
    Use this skill when the user says 'Tauri', 'Tauri v2', 'tauri command', 'invoke from frontend', 'tauri capabilities', 'tauri permissions', 'tauri plugin', 'tauri updater', 'Rust desktop app with web UI'. It builds secure Tauri 2 desktop (and mobile) apps: Rust commands, typed…
  • 100tauri-rust-and-frontend-desktop
    Architectural patterns, security IPC, performance optimization, native integration, and production best practices for building cross-platform desktop applications using Tauri (v2) and Rust with modern web frontends (React, Svelte, Vue). Use when designing, building, or optimizing Tauri desktop apps.
  • 100cc-tauri-project-standard
    Use when a Tauri application needs work on Rust commands, WebView IPC contracts, capabilities and permissions, managed state, desktop lifecycle, platform builds or release boundaries. A plain Rust library without Tauri is outside this specialty.
  • 100rust-tauri-backend
    Implement or modify VMark's Rust/Tauri v2 backend and its frontend bridge - Tauri commands, invoke/emit/listen IPC, menu items and accelerators, Tauri plugins and capabilities, windows, filesystem and platform behaviour in src-tauri. Use for any change under src-tauri/ or to a…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.