{"enrichment":{"faq":[{"a":"Tauri-development teaches you to define commands in Rust using the #[tauri::command] macro, which automatically exposes them to your frontend. Pair this with specta for type-safe bindings\u2014specta generates TypeScript types from your Rust function signatures, eliminating manual type duplication. Use proper async/await patterns and avoid blocking the async runtime with long-running operations; offload heavy work to separate threads via tauri::async_runtime or tokio tasks.","q":"How do I create Tauri commands with Rust?"},{"a":"Tauri-development covers invoking commands from React using the invoke function from @tauri-apps/api/core. Import your generated specta bindings to get full TypeScript type safety on both request and response. Handle Promise rejections gracefully\u2014Tauri commands can fail due to serialization errors, Rust panics, or validation logic. Always wrap invokes in try-catch or .catch() handlers and provide meaningful error feedback to users rather than exposing raw Rust error messages.","q":"What's the best way to call Tauri commands from React?"},{"a":"Tauri-development explains that specta introspects your Rust command signatures and generates bindings.ts with matching TypeScript types. Run specta's code generator (typically via build script) to sync types automatically. This ensures your React components receive the exact shape your Rust backend returns\u2014catch type mismatches at compile time, not runtime. If bindings.ts isn't generating, verify your #[tauri::command] macros are properly annotated and specta is configured in your Cargo.toml.","q":"How does specta type binding work between Tauri frontend and backend?"},{"a":"Tauri-development recommends enabling Tauri's debug logging via RUST_LOG=tauri=debug and checking browser console for invoke errors. Use the Tauri CLI's dev mode for hot-reload feedback. Verify command names match exactly between Rust definition and React invoke calls. Test serialization by logging both sides\u2014print the Rust value before returning and the JavaScript value after receiving. Check that custom types implement serde::Serialize/Deserialize and that your React payload matches the Rust function signature.","q":"How do I debug Tauri frontend-backend communication issues?"},{"a":"Tauri-development covers using tokio for concurrent operations and avoiding blocking the main async runtime with CPU-intensive work. Spawn heavy tasks on separate threads via tauri::async_runtime::spawn_blocking. Batch multiple command calls into a single invocation when possible to reduce IPC overhead. Implement proper state management with Tauri's State<T> to share resources across commands without re-initializing. Use lazy_static or once_cell for expensive initialization, and profile with flamegraph to identify bottlenecks.","q":"What are Tauri performance optimization and async best practices?"},{"a":"Tauri-development teaches window management via the Window API\u2014create, show, hide, and position windows programmatically from Rust commands or React. System tray integration uses tauri::SystemTray with menu items that trigger commands. Handle file system access through Tauri's fs scope (configure in tauri.conf.json) to enforce security boundaries. Implement input validation in Rust before processing user data, and never expose sensitive errors to the frontend\u2014log them server-side and return generic messages to prevent information leakage.","q":"How do I implement desktop-specific features like window management and system tray?"}],"shadow_tags":["rust-backend-integration","type-safe-ipc","desktop-app-framework","async-runtime-patterns","frontend-backend-bridge","cross-platform-desktop","command-architecture","error-handling-strategy"],"summary_rewrite":"This skill equips you with patterns for Tauri 2.0 desktop development, covering command definition with specta type generation, Rust-React integration, and proper error handling. Learn state management, async best practices, and desktop-specific constraints to avoid common pitfalls like blocking the async runtime or exposing sensitive errors."},"files":[{"bytes":7999,"path":".claude/skills/tauri-development/SKILL.md","sha256":"33d08fd10c7aba07612f08855b646cc865cea0a898f18baf1e50625b1909e1d4","url":"https://skillfed.io/files/cacr92/WeReply/tauri-development/13c1fd14/SKILL.md"}],"id":"cacr92/WeReply/tauri-development","links":{"html":"https://skillfed.io/cacr92/WeReply/tauri-development","md":"https://skillfed.io/cacr92/WeReply/tauri-development.md","repo":"https://github.com/cacr92/WeReply"},"meta":{"agents_supported":["claude-code","codex","cursor"],"first_seen":"2026-07-28","forks":3,"language":"Python","last_updated":"2026-01-30","license":"MIT","name":"tauri-development","publisher":"cacr92","stars":4},"relations":{"similar":[{"id":"cacr92/WeReply/api-design"},{"id":"cacr92/WeReply/error-handling-debugging"},{"id":"cacr92/WeReply/debugging"},{"id":"cacr92/WeReply/security-review"},{"id":"cacr92/WeReply/code-review"},{"id":"cacr92/WeReply/deepseek-integration"},{"id":"cacr92/WeReply/project-overview"},{"id":"cacr92/WeReply/refactoring"},{"id":"cacr92/WeReply/testing-strategy"},{"id":"bkywksj/knowledge-base/tauri-commands"}]},"slug":{"owner":"cacr92","repo":"WeReply","skill":"tauri-development"},"version":"13c1fd14"}
