tauri
npx skills add https://github.com/partme-ai/full-stack-skills --skill tauri
Agent 安装分布
Skill 文档
When to use this skill
Use this skill whenever the user wants to:
- Install and set up Tauri in a project
- Create desktop applications with Tauri
- Use Tauri CLI commands
- Configure Tauri applications
- Handle frontend-backend communication
- Use Tauri APIs
- Build and package Tauri applications
- Troubleshoot Tauri issues
How to use this skill
This skill is organized to match the Tauri official documentation structure (https://v2.tauri.org.cn/, https://v2.tauri.org.cn/start/, https://v2.tauri.org.cn/reference/cli/). When working with Tauri:
-
Identify the topic from the user’s request:
- Installation/å®è£
â
examples/start/installation.md - Quick Start/å¿«éå¼å§ â
examples/start/quick-start.md - Guide/ä½¿ç¨æå â
examples/guide/ - CLI/å½ä»¤è¡ â
examples/reference/cli.md - API/API ææ¡£ â
api/
- Installation/å®è£
â
-
Load the appropriate example file from the
examples/directory:Start (å¿«éå¼å§):
examples/start/intro.md– Introduction to Tauriexamples/start/installation.md– Installation guideexamples/start/quick-start.md– Quick start guideexamples/start/prerequisites.md– Prerequisites
Guide (ä½¿ç¨æå):
examples/guide/architecture.md– Architectureexamples/guide/frontend.md– Frontend setupexamples/guide/backend.md– Backend (Rust)examples/guide/commands.md– Commandsexamples/guide/events.md– Eventsexamples/guide/window.md– Window managementexamples/guide/filesystem.md– File systemexamples/guide/configuration.md– Configurationexamples/guide/build.md– Build and package
Reference (åè):
examples/reference/cli.md– CLI commandsexamples/reference/config.md– Configuration reference
-
Follow the specific instructions in that example file for syntax, structure, and best practices
Important Notes:
- Tauri uses Web frontend and Rust backend
- Frontend can be any web framework
- Backend is written in Rust
- Communication via commands and events
- Each example file includes key concepts, code examples, and key points
-
Reference API documentation in the
api/directory when needed:api/tauri-api.md– Tauri APIapi/commands-api.md– Commands APIapi/events-api.md– Events APIapi/window-api.md– Window APIapi/filesystem-api.md– File system APIapi/config-api.md– Configuration API
-
Use templates from the
templates/directory:templates/installation.md– Installation templatestemplates/project-setup.md– Project setup templatestemplates/configuration.md– Configuration templates
1. Understanding Tauri
Tauri is a framework for building desktop applications using web frontend technologies and Rust backend.
Key Concepts:
- Frontend: Web technologies (HTML, CSS, JavaScript)
- Backend: Rust
- Commands: Frontend-backend communication
- Events: Event system
- Window: Window management
- File System: File operations
2. Installation
Prerequisites:
- Node.js
- Rust
- System dependencies
Using npm:
npm install @tauri-apps/cli
Using cargo:
cargo install tauri-cli
3. Basic Setup
# Create Tauri project
npm create tauri-app
# Or using cargo
cargo tauri init
Doc mapping (one-to-one with official documentation)
examples/guide/orexamples/getting-started/â https://v2.tauri.org.cn/start/api/â https://v2.tauri.org.cn/reference/cli/
Examples and Templates
This skill includes detailed examples organized to match the official documentation structure. All examples are in the examples/ directory (see mapping above).
To use examples:
- Identify the topic from the user’s request
- Load the appropriate example file from the mapping above
- Follow the instructions, syntax, and best practices in that file
- Adapt the code examples to your specific use case
To use templates:
- Reference templates in
templates/directory for common scaffolding - Adapt templates to your specific needs and coding style
API Reference
Detailed API documentation is available in the api/ directory, organized to match the official Tauri API documentation structure:
Tauri API (api/tauri-api.md)
- Tauri core API
- API methods
- API types
Commands API (api/commands-api.md)
- Command definition
- Command invocation
- Command parameters
Events API (api/events-api.md)
- Event emission
- Event listening
- Event handling
Window API (api/window-api.md)
- Window creation
- Window management
- Window events
File System API (api/filesystem-api.md)
- File operations
- Directory operations
- Path operations
Configuration API (api/config-api.md)
- Configuration options
- Configuration file
- Environment variables
To use API reference:
- Identify the API you need help with
- Load the corresponding API file from the
api/directory - Find the API signature, parameters, return type, and examples
- Reference the linked example files for detailed usage patterns
- All API files include links to relevant example files in the
examples/directory
Best Practices
- Separate frontend and backend: Keep frontend and backend code separate
- Use commands: Use commands for frontend-backend communication
- Handle errors: Properly handle errors in both frontend and backend
- Security: Follow Tauri security best practices
- Performance: Optimize application performance
- Build configuration: Configure build and package properly
- Use TypeScript: Leverage TypeScript for type safety
Resources
- Official Documentation: https://v2.tauri.org.cn/
- Quick Start: https://v2.tauri.org.cn/start/
- CLI Reference: https://v2.tauri.org.cn/reference/cli/
- GitHub Repository: https://github.com/tauri-apps/tauri
Keywords
Tauri, tauri, desktop application, æ¡é¢åºç¨, Rust, Web frontend, commands, events, window, file system, CLI, å½ä»¤, äºä»¶, çªå£, æä»¶ç³»ç», å½ä»¤è¡, Tauri CLI, Tauri commands, Tauri events, Tauri window, Tauri filesystem, cross-platform, 跨平å°