Rust environment building
Rust supports many integrated development environments (IDE) or specialized text editors for development.
The supported tools announced on the official website are as follows (https://www.rust-lang.org/zh-CN/tools):
This tutorial will use Visual Studio Code as our development environment (Eclipse has a version dedicated to Rust development, which is also a good choice for beginners).
Note: IntelliJ IDEA is difficult to debug after installing plug-ins, so developers who are used to using IDEA are recommended to use CLion, but CLion is not free.
Build Visual Studio Code development environment
First, you need to install the latest version of the Rust compilation tool and Visual Studio Code.
Rust compilation tool: https://www.rust-lang.org/zh-CN/tools/install
Visual Studio Code: https://code.visualstudio.com/Download
Rust’s compilation tools rely on C language compilation tools, which means that at least one C language compilation environment already exists on your computer. If you are using a Linux system, you often already have GCC or clang. If you are using macOS, you need to install Xcode. If you are using the Windows operating system, you need to install Visual Studio 2013 or above (requires Cmax Candle + support) to use MSVC or install the MinGW + GCC compiler environment (Cygwin has not been tested yet).
Install the Rust compilation tool
The Rust compilation tool recommends using the Rustup installation that you just downloaded from the link above. The downloaded Rustup is an executable program on Windows rustup-init.exe
. (on other platforms it should be rustup-init.sh
).
Execute now rustup-init
File:
The figure above shows a command line installation wizard.
If you have already installed MSVC (recommended), then the installation process will be very simple, type 1 and enter, and go straight to the secondstep.