1.下载安装rust
地址:https://www.rust-lang.org/learn/get-started
1.1rust安装
选择2自定义安装,default host tripe输入x86_64-pc-windows-gnu.default toolchain选择nightly.Profile选择complete。path输入y.再选择1进行安装。
1.2环境变量的配置
CARGO_HOME="%USERPROFILE%.cargo"
RUSTBINPATH="%CARGO_HOME%\bin"
RUST="%USERPROFILE%.rustup\toolchains\nightly-x86_64-pc-windows-gnu"
RUST_SRC_PATH="%RUST%\lib\rustlib\src\rust\src"
path=%PATH%,%RUSTBINPATH%
1.3config创建
在C:\Users\username.cargo创建config文件输入
[source.crates-io]
registry = “https://github.com/rust-lang/crates.io-index”
replace-with = ‘ustc’
[source.ustc]
registry = “git://mirrors.ustc.edu.cn/crates.io-index”
插入racer 命令行执行cargo install racer
2.安装mingw-w64
下载网站http://mingw-w64.org/doku.php/download/mingw-builds
2.1配置环境变量
C_INCLUDE_PATH = “安装路径\mingw64\include”
3.安装CLion
下载地址https://www.jetbrains.com/clion/download/#section=windows
3.1下载rust插件
在file->settings->plugins搜索rust安装