Rules for integrating Tauri's native APIs in the frontend application.
tauri-specta to generate TypeScript types from Rust structs for type safety| Anti-Pattern | Why It Fails | Correct Approach | | -------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------- | | No command allowlist | All Rust functions exposed to frontend; attack surface maximized | Allowlist only specific commands needed by the frontend | | Trusting frontend input | Malicious payloads can exploit Rust code | Validate and sanitize all IPC inputs on the Rust side | | Synchronous I/O in commands | Blocks the Tauri event loop; UI freezes | Use async Rust for all I/O operations in command handlers | | Missing TypeScript types | Runtime type mismatches between Rust and frontend | Use tauri-specta to generate TypeScript types from Rust structs | | Large synchronous data transfers | IPC bottleneck causes UI stuttering | Stream or chunk large data; avoid transferring full datasets over IPC |
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.
npx skills add oimiragieo/tauri-native-api-integration下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer