multiAI Summary Pending
tauri-app-wasm
Compile Rust code to WebAssembly and run it in the Tauri v2 frontend for high-performance computation. Use when offloading CPU-intensive work to WASM in the WebView, deciding between WASM vs IPC for Rust logic, or optimizing frontend performance with Rust-compiled modules.
223 stars
Installation
Claude Code / Cursor / Codex
$curl -o ~/.claude/skills/tauri-app-wasm/SKILL.md --create-dirs "https://raw.githubusercontent.com/partme-ai/full-stack-skills/main/skills/tauri-skills/tauri-app-wasm/SKILL.md"
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tauri-app-wasm/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How tauri-app-wasm Compares
| Feature / Agent | tauri-app-wasm | Standard Approach |
|---|---|---|
| Platform Support | multi | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Compile Rust code to WebAssembly and run it in the Tauri v2 frontend for high-performance computation. Use when offloading CPU-intensive work to WASM in the WebView, deciding between WASM vs IPC for Rust logic, or optimizing frontend performance with Rust-compiled modules.
Which AI agents support this skill?
This skill is compatible with multi.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## When to use this skill
**ALWAYS use this skill when the user mentions:**
- Running Rust code as WASM in the Tauri frontend
- WASM vs IPC performance trade-offs
- High-performance frontend computation
**Trigger phrases include:**
- "WASM", "WebAssembly", "wasm-pack", "Rust in browser", "frontend performance"
## How to use this skill
1. **Set up a WASM crate** alongside your Tauri project:
```bash
cargo install wasm-pack
wasm-pack new my-wasm-lib
```
2. **Build Rust code to WASM**:
```bash
wasm-pack build --target web my-wasm-lib
```
3. **Import the WASM module** in your frontend:
```typescript
import init, { process_data } from '../my-wasm-lib/pkg';
await init();
const result = process_data(inputBuffer);
```
4. **Choose WASM vs IPC**:
- Use **WASM** for CPU-bound computation that doesn't need system APIs (image processing, crypto, parsing)
- Use **IPC** (invoke) for anything requiring OS access (file system, network, notifications)
5. **Monitor bundle size** impact -- WASM modules add to the frontend bundle
6. **Benchmark** to verify WASM gives measurable performance gains over JavaScript
## Outputs
- WASM crate setup and build pipeline
- Frontend WASM module import pattern
- WASM vs IPC decision framework
## References
- https://v2.tauri.app/develop/calling-rust/#wasm
- https://crates.io/crates/tauri-wasm
## Keywords
tauri wasm, WebAssembly, wasm-pack, Rust wasm, frontend performance