rust-环境搭建-MinGW
x86_64-pc-windows-gnu MinGW
x86_64-pc-windows-msvc VC++
MinGW
gcc -v gcc version 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)
下载rustup
https://www.rust-lang.org/learn/get-started
安装路径指定
默认路径
C:\Users\user\.rustup
C:\Users\user\.cargo
指定路径
CARGO_HOME
-> D:\Program Files\RusT\cargo
RUSTUP_HOME
-> D:\Program Files\Rust\rustup
安装
取消Visual C++
自定义安装
使用 MinGW
x86_64-pc-windows-gnu
可选配置
再次选择MinGW
完成
验证
编译测试
加速配置
D:\Program Files\RusT\cargo\config
[source.crates-io]
# To use sparse index, change 'rsproxy' to 'rsproxy-sparse'
replace-with = 'rsproxy'
[source.rsproxy]
registry = "https://rsproxy.cn/crates.io-index"
[source.rsproxy-sparse]
registry = "sparse+https://rsproxy.cn/index/"
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
[net]
git-fetch-with-cli = true
Comments