1. 顶层(前端工程):就是一个普通的 Web 项目
Tauri 的项目结构非常'工程化':通常由两部分组成
- 可选的 JavaScript/前端工程(负责 UI,最终产出静态资源)
- 必须的 Rust 工程(在
src-tauri/,负责窗口、系统能力、打包分发、安全边界)
典型目录结构如下:
.
├── package.json
├── index.html
├── src/
│ ├── main.js
├── src-tauri/
│ ├── Cargo.toml
│ ├── Cargo.lock
│ ├── build.rs
│ ├── tauri.conf.json
│ ├── src/
│ │ ├── main.rs
│ │ └── lib.rs
│ ├── icons/
│ │ ├── icon.png
│ │ ├── icon.icns
│ │ └── icon.ico
│ └── capabilities/
│ └── default.json

