Kerinlin / vue-tauri-template

A template with vue2.x and tauri

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tauri环境搭建

按照官方文档,选择自己的平台搭建,这里以mac为例

安装命令行工具

xcode-select --install

安装gcc

brew install gcc

安装配置rust环境

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

rust环境配置完成后可以通过查询版本确认安装情况

rustc --version

设置镜像

之前被中科大的镜像给坑了,后面找了很久发现字节跳动的镜像不错

crates.io Mirror

在**~/.cargo/config**中输入以下内容

[source.crates-io]
replace-with = 'rsproxy'

[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"

[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"

[net]
git-fetch-with-cli = true

Rustup Mirror

在**~/.zshrc or ~/.bashrch**中输入以下内容

export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"

模板使用

  1. 克隆模板

    git@github.com:Kerinlin/vue-tauri-template.git
  2. 安装依赖

    yarn
  3. 运行项目

    yarn tauri:serve
  4. 打包项目

    yarn tauri:build

About

A template with vue2.x and tauri


Languages

Language:JavaScript 40.3%Language:HTML 33.1%Language:Rust 14.7%Language:Vue 11.8%