Need to install the following packages: create-vite@7.0.3 Ok to proceed? (y) y
✔ Select a framework: › Vue ✔ Select a variant: › TypeScript
Scaffolding project in /path/to/yourRepoName...
Done. Now run:
cd yourRepoName npm install npm run dev
2. 安装Tauri依赖
进入项目目录并安装Tauri CLI:
1 2
cd yourRepoName cnpm install -D @tauri-apps/cli@next
3. 初始化Tauri配置
运行初始化命令:
1
npx tauri init
完整交互过程:
1 2 3 4 5 6
✔ What is your app name? · yourAppName ✔ What should the window title be? · yourAppName ✔ Where are your web assets located? · ../dist ✔ What is the url of your dev server? · http://localhost:3000 ✔ What is your frontend dev command? · npm run dev ✔ What is your frontend build command? · npm run build
4. 安装项目依赖
1
cnpm install
5. Rust镜像配置(可选)
对于国内用户,可以设置Rust镜像加速:
1 2 3
# Windows PowerShell $ENV:RUSTUP_DIST_SERVER='https://mirrors.ustc.edu.cn/rust-static' $ENV:RUSTUP_UPDATE_ROOT='https://mirrors.ustc.edu.cn/rust-static/rustup'