# tauri.app **Repository Path**: zinface/tauri.app ## Basic Information - **Project Name**: tauri.app - **Description**: 虽然 tauri 不会前端和 rust ,但我会学! - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-12 - **Last Updated**: 2023-09-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # tauri.app > tauri-app 项目记录 - 示例运行界面 ![Alt text](assets/image.png) - 项目从创建到打包历程 ```sh # 中文指南: https://tauri.app/zh-cn/v1/guides/getting-started/setup/ # 创建一个 tauri-app 项目 npm create tauri-app@latest # 进入 tauri-app 目录 cd tauri-app # 官方建议使用 pnpm install,尚处于未安装状态则不使用 # [x] pnpm install # [x] pnpm tauri dev # 使用 npm install 安装所有依赖,如果你想使用例如:yarn(请自行研究) npm install # 由于官方建议用 pnpm,我则安装它(非全局,直接安装在 node_moduels 目录) npm install pnpm # 启动开发服务器(启动 Tauri 开发窗口) # 官方建议执行: pnpm run tauri dev ,此次我未使用 # 由于 pnpm 安装在 node_modules 目录下,你需要使用 npx 来执行(后面会看到) npm run tauri dev # 另,此处可能产生 rustc 版本过低,而 rustup 镜像不够给力,可使用 https://rsproxy.cn/ 镜像 # 配置文件: ~/.cargo/config # rust 版本更新: 运行 rustup update 获取最新版本的 Rust # 此处可能出现一些重复,它是初始化 src-tauri 目录为 rust 项目结构 # npm run tauri init # 修改 tauri-app/src-tauri/tauri.conf.json change: identifier # 此次执行构建(也即打包),如果空间不足,可停止开发服务,并删除 debug 目录。 npm run tauri build # Error failed to bundle project: error running appimage.sh # 如果发生错误,可使用 --verbose 参数查看步骤失败的详细部分 # 使用 npx 调用安装在 node_modules 中的 pnpm 命令 # 你也可以使用 ./node_modules/.bin/pnpm 来代替 npx pnpm npx pnpm tauri build --verbose # 例如:问题出在 wget 部分,请自行研究方案(而本平台产生的 deb 包已处于可用) # wget -q -4 -N https://raw.githubusercontent.com/tauri-apps/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh # Error [tauri_cli_node] failed to bundle project: error running appimage.sh # deb 安装包: (项目目录)tauri-app/src-tauri/target/release/bundle/deb/tauri-app_0.0.0_amd64.deb ``` - 项目空间占用记录 debug 目录: >2.5GB(已删除未显示) release 目录:<2GB ![Alt text](assets/image1.png) This template should help get you started developing with Tauri in vanilla HTML, CSS and Typescript. ## Recommended IDE Setup - [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer)