본문으로 건너뛰기
cccskills
무료GitHub에 공개

tauri-expert

Expert skill for Tauri (v2) development, Rust backend, IPC, and security / Panduan ahli untuk pengembangan Tauri v2, Rust backend, IPC, dan keamanan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Tauri Expert

English | Bahasa Indonesia


<a name="english"></a>

English

Orchestration & Integration

Connects and orchestrates with relevant domain skills like brainstorming, zero-to-prod-orchestrator, and session-memory-manager to ensure cohesive execution.

Description

This skill provides best practice guidance for building cross-platform desktop and mobile applications using Tauri (specifically Tauri v2). It covers frontend integration with the Rust backend, Inter-Process Communication (IPC), state management, and security.

Instructions & Best Practices

1. Architecture & IPC (Inter-Process Communication)

  • Use tauri::command to define Rust functions callable from the frontend.
  • Invoke Rust functions from the frontend using @tauri-apps/api/core (invoke).
  • Utilize Tauri's event system (emit from Rust, listen on frontend) for real-time or async updates.
  • Keep heavy processing and filesystem access in Rust (backend), while the frontend focuses purely on UI.

2. State Management (Rust Backend)

  • Use tauri::State to store and manage global state in the Rust backend.
  • Use std::sync::Mutex or tokio::sync::Mutex (if async) for mutable state.
  • Initialize managed state during application setup: tauri::Builder::default().manage(MyState::default()).

3. Security & Capabilities

  • Enforce strict context isolation.
  • In Tauri v2, use the Capabilities system to restrict API access per window or plugin.
  • Never expose dangerous filesystem, shell, or network APIs globally. Only grant allowlist access to specific, required paths or commands.

4. Performance & Concurrency

  • Use async fn for tauri::command when handling heavy I/O to avoid blocking the main thread.
  • Use serde (Serialize, Deserialize) efficiently for data structures sent between Rust and the frontend.

5. Plugin Management (Tauri v2)

  • Use official Tauri plugins (e.g., tauri-plugin-fs, tauri-plugin-store, tauri-plugin-dialog) instead of writing custom I/O modules when available.
  • Initialize plugins in main.rs or lib.rs: app.plugin(tauri_plugin_dialog::init()).

6. Cross-Platform & Build

  • Avoid hardcoded paths. Use the app_handle.path() resolver for AppData, Cache, and other system directories.
  • Ensure dependencies in Cargo.toml support cross-compilation (Windows, macOS, Linux, iOS, Android).

Trigger Conditions

Active when:

  • Building, debugging, or refactoring Tauri applications.
  • Writing IPC systems between the frontend (React/Svelte/Vue) and the Rust backend.
  • Configuring security (tauri.conf.json, capabilities, permissions).

Implementation Examples

1. Rust Backend Command Definition (src-tauri/src/lib.rs)

use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize)]
pub struct MetricsPayload {
    pub cpu_usage: f32,
    pub memory_used_mb: u64,
}

#[tauri::command]
pub async fn fetch_system_metrics() -> Result<MetricsPayload, String> {
    Ok(MetricsPayload {
        cpu_usage: 12.4,
        memory_used_mb: 2048,
    })
}

#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![fetch_system_metrics])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

2. Frontend TypeScript Invocation (src/lib/metrics.ts)

import { invoke } from '@tauri-apps/api/core';

export interface MetricsPayload {
  cpu_usage: number;
  memory_used_mb: number;
}

export async function getSystemMetrics(): Promise<MetricsPayload> {
  return await invoke<MetricsPayload>('fetch_system_metrics');
}

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Integrasi Orkestrasi

Terhubung dan mengorkestrasi skill domain yang relevan seperti brainstorming, zero-to-prod-orchestrator, dan session-memory-manager untuk memastikan eksekusi yang kohesif.

Deskripsi

Skill ini memberikan panduan praktik terbaik (best practices) untuk membangun aplikasi desktop dan mobile lintas platform menggunakan Tauri (terutama Tauri v2). Skill ini mencakup integrasi frontend dengan backend Rust, Inter-Process Communication (IPC), manajemen state, serta keamanan.

Instruksi & Praktik Terbaik

1. Arsitektur & IPC (Inter-Process Communication)

  • Gunakan tauri::command untuk mendefinisikan fungsi Rust yang bisa dipanggil dari frontend.
  • Panggil fungsi Rust dari frontend menggunakan @tauri-apps/api/core (invoke).
  • Manfaatkan sistem event Tauri (emit dari Rust, listen di frontend) untuk pembaruan real-time atau asinkron dari backend.
  • Lakukan operasi berat di sisi Rust (backend), sedangkan frontend hanya fokus pada UI.

2. Manajemen State (Rust Backend)

  • Gunakan tauri::State untuk menyimpan dan mengelola state global di backend Rust.
  • Gunakan std::sync::Mutex or tokio::sync::Mutex (jika asinkron) untuk state yang bisa berubah (mutable state).
  • Lakukan inisialisasi state saat setup aplikasi: tauri::Builder::default().manage(MyState::default()).

3. Keamanan (Security & Capabilities)

  • Terapkan isolasi konteks secara ketat.
  • Di Tauri v2, gunakan sistem Capabilities untuk membatasi akses API per jendela/plugin.
  • Jangan mengekspos API filesystem, shell, atau jaringan yang berbahaya secara global. Hanya beri akses (allowlist) ke path atau perintah (commands) yang spesifik dan dibutuhkan.

4. Kinerja & Asinkronisitas

  • Gunakan async fn pada tauri::command untuk I/O yang berat agar tidak memblokir main thread.
  • Gunakan serde (Serialize, Deserialize) secara efisien untuk mengirim struktur data kompleks antara Rust dan frontend.

5. Pengelolaan Plugin (Tauri v2)

  • Gunakan ekosistem plugin Tauri (seperti tauri-plugin-fs, tauri-plugin-store, tauri-plugin-dialog) alih-alih membuat modul I/O sendiri jika sudah tersedia.
  • Inisialisasi plugin di file main.rs atau lib.rs: app.plugin(tauri_plugin_dialog::init()).

6. Lintas Platform (Cross-Platform) & Build

  • Hindari hardcode path sistem operasi. Gunakan app_handle.path() resolver untuk direktori AppData, Cache, dsb.
  • Pastikan dependencies di Cargo.toml mendukung cross-compilation (Windows, macOS, Linux, iOS, Android).

Kondisi Pemicu

Aktif saat:

  • Membangun, men-debug, atau melakukan refactoring pada aplikasi Tauri.
  • Menulis sistem IPC antara frontend (React/Svelte/Vue) dan backend Rust.
  • Mengonfigurasi keamanan (tauri.conf.json, capabilities, permission).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug1052026년 10월 20일 업데이트

roedyrustam의 스킬 모두 보기

이 스킬의 문제 신고