toolchains/rust/desktop-applications/SKILL.md
Build cross-platform desktop applications with Rust using Tauri framework and native GUI alternatives
npx skillsauth add bobmatnyc/claude-mpm-skills rust-desktop-applicationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Rust has emerged as a premier language for building desktop applications that combine native performance with memory safety. The ecosystem offers two main approaches: Tauri for hybrid web UI + Rust backend apps (think Electron but 10x smaller and faster), and native GUI frameworks like egui, iced, and slint for pure Rust interfaces.
Tauri has revolutionized desktop development by enabling developers to use web technologies (React, Vue, Svelte) for the frontend while leveraging Rust's performance and safety for system-level operations. With bundle sizes under 5MB and memory usage 1/10th of Electron, Tauri apps deliver desktop-class performance. Native frameworks shine for specialized use cases: egui for immediate-mode tools and game editors, iced for Elm-style reactive apps, slint for embedded and declarative UIs.
This skill covers the complete Rust desktop development lifecycle from framework selection through architecture, state management, platform integration, and deployment. You'll build production-ready applications with proper IPC patterns, async runtime integration, native system access, and cross-platform distribution.
Activate when building desktop applications that need native performance, small bundle sizes, system integration, or memory safety guarantees. Specifically use when:
TAURI FOR WEB UI + RUST BACKEND | NATIVE GUI FOR PURE RUST | NEVER MIX BUSINESS LOGIC IN FRONTEND
Duplicating logic between frontend and backend, or bypassing IPC for direct access, violates architecture.
Choose Your Framework
cargo install tauri-cliInitialize Project
# Tauri
cargo create-tauri-app my-app
# Select: npm, React/Vue/Svelte, TypeScript
# Native (egui example)
cargo new my-app
cargo add eframe egui
Setup Architecture
src-tauri/src/main.rs, handle IPCsrc/ (backend), ui/ or src-ui/ (frontend if Tauri)Implement Core Features
#[tauri::command]Result<T, E>Add Platform Integration
Build and Distribute
# Development
cargo tauri dev # or cargo run
# Production build
cargo tauri build # Creates installers for current platform
# Cross-platform: Use GitHub Actions with matrix builds
Need desktop app?
├─ Have web frontend skills (React/Vue/Svelte)?
│ └─ YES → Use Tauri
│ ├─ Need <5MB bundles? ✓
│ ├─ System integration? ✓
│ ├─ Cross-platform? ✓
│ └─ Rapid UI development? ✓
│
└─ Pure Rust, no web frontend?
├─ Game editor or immediate mode tools? → egui
├─ Elm-style reactive architecture? → iced
├─ Declarative UI, embedded devices? → slint
└─ Data-first reactive? → druid
Tauri when: Web UI expertise, need modern frontend frameworks, rapid iteration Native when: Maximum performance, no web dependencies, specialized UI patterns
Detailed guides available:
Correct Tauri Pattern:
✅ Commands in Rust backend
✅ Type-safe IPC with serde
✅ Async operations with Tokio
✅ State management with Arc<Mutex<T>>
✅ Error propagation with Result<T, E>
✅ Frontend calls backend via invoke()
Correct Native GUI Pattern:
✅ Immediate mode (egui) or retained mode (iced)
✅ State updates trigger redraws
✅ Event handling in Rust
✅ Platform-agnostic rendering
✅ Resource cleanup on drop
Incorrect Patterns:
❌ Business logic in frontend JavaScript
❌ Exposing unsafe commands without validation
❌ Blocking operations on main thread
❌ Direct filesystem access from frontend
❌ Missing error handling on IPC
❌ Hardcoded platform-specific paths
Performance Metrics:
Production Examples:
Rust desktop development offers unmatched performance with memory safety.
Choose Tauri for web UI + Rust backend with tiny bundles. Choose native GUI for pure Rust with specialized patterns. Architect with clear frontend/backend separation. Use type-safe IPC. Integrate Tokio for async. Handle platform differences. Test cross-platform early.
This is the Rust desktop way.
development
Optimize web performance using Core Web Vitals, modern patterns (View Transitions, Speculation Rules), and framework-specific techniques
development
Best practices for documenting APIs and code interfaces, eliminating redundant documentation guidance per agent.
development
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices
development
Visual verification workflow for UI changes to accelerate code review and catch ...