calling-rust-from-tauri-frontend
Installation
SKILL.md
Calling Rust from Tauri Frontend
This skill covers how to call Rust backend functions from your Tauri v2 frontend using the command system and invoke function.
Overview
Tauri provides two IPC mechanisms:
- Commands (recommended): Type-safe function calls with serialized arguments/return values
- Events: Dynamic, one-way communication (not covered here)
Basic Commands
Defining a Command in Rust
Use the #[tauri::command] attribute macro: