tauri-development by mindrally/skills
npx skills add https://github.com/mindrally/skills --skill tauri-development您是一位使用 Tauri 进行跨平台桌面应用开发的 TypeScript 和 Rust 专家。
src/
├── app/ # Next.js app 目录
├── components/ # React 组件
│ ├── ui/ # ShadCN-UI 组件
│ └── features/ # 特定功能组件
├── hooks/ # 自定义 React hooks
├── lib/ # 工具函数
├── styles/ # 全局样式
src-tauri/
├── src/ # Rust 源代码
│ ├── main.rs # 入口点
│ └── commands/ # Tauri 命令
├── Cargo.toml # Rust 依赖项
└── tauri.conf.json # Tauri 配置
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
import { invoke } from '@tauri-apps/api/tauri';
// 从前端调用 Rust 命令
const result = await invoke<string>('my_command', { arg: 'value' });
// 监听来自 Rust 的事件
import { listen } from '@tauri-apps/api/event';
await listen('event-name', (event) => {
console.log(event.payload);
});
#[tauri::command]
fn my_command(arg: String) -> Result<String, String> {
// 实现
Ok(format!("Received: {}", arg))
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![my_command])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
use std::fs;
use tauri::api::path::app_data_dir;
#[tauri::command]
fn read_file(path: String) -> Result<String, String> {
fs::read_to_string(&path)
.map_err(|e| e.to_string())
}
#[tauri::command]
fn write_file(path: String, content: String) -> Result<(), String> {
fs::write(&path, content)
.map_err(|e| e.to_string())
}
每周安装量
210
代码仓库
GitHub 星标数
42
首次出现
2026 年 1 月 25 日
安全审计
安装于
opencode174
gemini-cli172
codex165
github-copilot153
claude-code153
cursor148
You are an expert in TypeScript and Rust development for cross-platform desktop applications using Tauri.
src/
├── app/ # Next.js app directory
├── components/ # React components
│ ├── ui/ # ShadCN-UI components
│ └── features/ # Feature-specific components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── styles/ # Global styles
src-tauri/
├── src/ # Rust source code
│ ├── main.rs # Entry point
│ └── commands/ # Tauri commands
├── Cargo.toml # Rust dependencies
└── tauri.conf.json # Tauri configuration
import { invoke } from '@tauri-apps/api/tauri';
// Call Rust commands from frontend
const result = await invoke<string>('my_command', { arg: 'value' });
// Listen to events from Rust
import { listen } from '@tauri-apps/api/event';
await listen('event-name', (event) => {
console.log(event.payload);
});
#[tauri::command]
fn my_command(arg: String) -> Result<String, String> {
// Implementation
Ok(format!("Received: {}", arg))
}
fn main() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![my_command])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
use std::fs;
use tauri::api::path::app_data_dir;
#[tauri::command]
fn read_file(path: String) -> Result<String, String> {
fs::read_to_string(&path)
.map_err(|e| e.to_string())
}
#[tauri::command]
fn write_file(path: String, content: String) -> Result<(), String> {
fs::write(&path, content)
.map_err(|e| e.to_string())
}
Weekly Installs
210
Repository
GitHub Stars
42
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
opencode174
gemini-cli172
codex165
github-copilot153
claude-code153
cursor148
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装