新增: Tauri 2.0 桌面版脚手架(B0)

- src-tauri/ 完整项目结构: Cargo.toml / build.rs / tauri.conf.json
- Rust 入口 lib.rs: ping IPC 命令验证双向通信
- 应用图标生成(SVG → ico/icns/png 多尺寸)
- Tauri 窗口配置: 1280×800, 最小 900×600, 可缩放
- package.json 新增 tauri / tauri:dev / tauri:build 脚本
- vite.config.ts 环境检测: Tauri 模式端口 5173, Web 模式 8080
- @tauri-apps/cli + @tauri-apps/api 依赖安装
- cargo check 编译通过,前端构建不受影响
- 桌面版与 Web 版共享同一套前端代码
This commit is contained in:
2026-07-12 15:11:35 +08:00
parent 056dc58318
commit b9a388b570
28 changed files with 4728 additions and 2 deletions

10
src-tauri/app-icon.svg Normal file
View File

@@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512">
<rect width="512" height="512" rx="96" fill="#4f46e5"/>
<rect x="128" y="120" width="256" height="272" rx="16" fill="#fff"/>
<rect x="160" y="160" width="192" height="8" rx="4" fill="#4f46e5"/>
<rect x="160" y="184" width="160" height="6" rx="3" fill="#c7d2fe"/>
<rect x="160" y="204" width="176" height="6" rx="3" fill="#c7d2fe"/>
<rect x="160" y="224" width="128" height="6" rx="3" fill="#c7d2fe"/>
<circle cx="272" cy="312" r="40" fill="#06b6d4"/>
<rect x="150" y="300" width="80" height="56" rx="8" fill="#818cf8"/>
</svg>

After

Width:  |  Height:  |  Size: 631 B