tauri-v2
Installation
SKILL.md
Tauri v2 Best Practices
IPC Commands
// BAD: sync command — blocks UI thread
#[tauri::command]
fn read_file(path: String) -> Result<String, String> {
std::fs::read_to_string(path).map_err(|e| e.to_string())
}
// GOOD: async command — runs on separate thread
#[tauri::command]
async fn read_file(path: String) -> Result<String, String> {
tokio::fs::read_to_string(path).await.map_err(|e| e.to_string())
}