Skip to main content

Setup for Windows

此设置仅用于开发。 Tauri 应用程序的使用者将不必执行任何这些操作。

此页面提供了安装 Tauri 及其依赖项的完整指南。 因为 Tauri 是一个多语言工具链并且涉及复杂的安装说明,我们希望确保任何人都能够通过阅读本指南来设置它,而无需打开其他文档。

初次之外,这里也有很好的技巧和工具。如果你从 Node.js 或 Rust 和安全性开始,它们将对您有所帮助。

: 这个步骤是必须的
: 如果已经满足可以跳过这一步(例如你已经安装好了Node.js/Rust)
: 此步骤仅供参考

1. System Dependencies #

You'll need to install Microsoft Visual Studio C++ build tools. Download the installer here, and then run it. When it asks you what packages you would like to install, select C++ Build Tools.

2. Node.js Runtime and Package Manager #

Node.js (npm included)#

We recommend using nvm-windows to manage your Node.js runtime. It allows you to easily switch versions and update Node.js.

Then run the following from an Administrative PowerShell and press Y when prompted:

# BE SURE YOU ARE IN AN ADMINISTRATIVE PowerShell!
nvm install latest
nvm use {{latest}} # Replace with your latest downloaded version

This will install the most recent version of Node.js with npm.

Optional Node.js Package Manager#

You may want to use an alternative to npm:

3. Rustc and Cargo Package Manager #

Now you will need to install Rust. The easiest way to do this is to use rustup, the official installer.

Download and install the proper variant for your computer's architecture.

4. Install WebView2#

Finally, you will need to install WebView2. The best way to do this is to download and run the Evergreen Bootstrapper from this page.

Continue#

Now that you have set up the Windows-specific dependencies for Tauri, learn how to add Tauri to your project.