tauri-ipc

Installation
SKILL.md

When to use this skill

ALWAYS use this skill when the user mentions:

  • Frontend-to-Rust IPC or invoke calls
  • Defining Tauri commands
  • Type-safe IPC bindings (tauri-specta)

Trigger phrases include:

  • "IPC", "invoke", "tauri command", "type-safe", "tauri-specta", "calling rust"

How to use this skill

  1. Define a Rust command:
    #[tauri::command]
    fn greet(name: &str) -> String {
        format!("Hello, {}!", name)
    }
    
  2. Register the command in the Tauri builder:
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
    
  3. Call from the frontend:
    import { invoke } from '@tauri-apps/api/core';
    const greeting = await invoke<string>('greet', { name: 'World' });
    
  4. For type-safe bindings, use tauri-specta to auto-generate TypeScript types from Rust commands:
    cargo add tauri-specta specta
    
  5. Bidirectional events for Rust-to-frontend communication:
    app.emit("update", payload)?;  // Rust -> Frontend
    
    import { listen } from '@tauri-apps/api/event';
    await listen('update', (event) => console.log(event.payload));
    
  6. Handle errors by returning Result<T, String> from Rust commands

Outputs

  • Rust command definition and registration
  • Frontend invoke call pattern
  • Type-safe IPC with tauri-specta
  • Bidirectional event communication

References

Keywords

tauri IPC, invoke, tauri command, type-safe, tauri-specta, events

Related skills

More from partme-ai/full-stack-skills

Installs
7
GitHub Stars
366
First Seen
Mar 25, 2026