# Tauri Engineering

> Production-grade Tauri v2 engineering guidelines — guest-host architecture, IPC commands, state management, ACL security, plugins, testing, performance optimization, auto-updates, and CI/CD. Use when building Tauri desktop or mobile apps, configuring tauri.conf.json, writing Tauri commands/plugins, setting up Tauri permissions/capabilities, debugging Webview issues, optimizing Tauri binary size,…

- **Type:** Skill
- **Install:** `agentstack add skill-galaxyruler-galactic-skills-tauri-engineering`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [GalaxyRuler](https://agentstack.voostack.com/s/galaxyruler)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [GalaxyRuler](https://github.com/GalaxyRuler)
- **Source:** https://github.com/GalaxyRuler/Galactic-skills/tree/main/skills/tauri-engineering

## Install

```sh
agentstack add skill-galaxyruler-galactic-skills-tauri-engineering
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Tauri Engineering

Strict operational guidelines for building, securing, and shipping Tauri v2 applications. For Rust-side patterns (ownership, error handling, async, testing), see [rust-engineering](../rust-engineering/SKILL.md).

## Architecture

- **Guest-host model**: multi-process — TAO for window management, WRY for rendering via OS-native Webview (not bundled Chromium).
- **No SSR**: configure frameworks for SPA or SSG mode. SvelteKit → `@sveltejs/adapter-static`.
- **Vite**: `strictPort: true`, mobile HMR via `TAURI_DEV_HOST`, build targets `chrome105` (Windows) / `safari13` (macOS/iOS).

## IPC & commands

- Custom Protocol (JSON-RPC styled) replaces JSON string injection in v2.
- Raw byte streaming via `tauri::ipc::Response` for large payloads — bypasses JSON serialization.
- Async commands can't accept `&str` or `State` — use owned types (`String`) or wrap in `Result`.
- Commands in `lib.rs` must not be `pub`; register with `tauri::generate_handler!`.

## State management

- Register with `app.manage()` during setup.
- Shared mutable state → `std::sync::Mutex` or `RwLock`.
- Async: use `std::sync::Mutex` unless guard held across `.await` → then `tokio::sync::Mutex`.

## Security

- **ACL**: define Permissions (commands + scopes) and Capabilities (map to windows/webviews). Identifiers: lowercase ASCII, max 116 chars.
- **Isolation Pattern**: required for high security — sandboxed ``, AES-GCM encrypted IPC payloads.
- **CSP**: always enforce. Tauri calculates script hashes and appends nonces.
- **Filesystem**: `tauri-plugin-fs` enforces Base Directory containment. Block `../` traversal.
- **Shell**: pre-configure allowed processes, args, and paths in capabilities.

## Testing & performance

Testing checklist, binary optimization (`lto`, `codegen-units`, `strip`), cross-platform bundling (Linux/macOS/Windows), and CI/CD with `tauri-apps/tauri-action`: [TESTING-PERF.md](TESTING-PERF.md).

## Auto-updates & anti-patterns

Updater signature enforcement, key management, server response contracts, platform-specific deployment, and critical anti-patterns to avoid: [UPDATES-DEPLOY.md](UPDATES-DEPLOY.md).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [GalaxyRuler](https://github.com/GalaxyRuler)
- **Source:** [GalaxyRuler/Galactic-skills](https://github.com/GalaxyRuler/Galactic-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-galaxyruler-galactic-skills-tauri-engineering
- Seller: https://agentstack.voostack.com/s/galaxyruler
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
