win安装rust环境(mingw)


官网下载安装文件
 
安装mignw
 
修改系统环境变量
名称 - 值
RUSTUP_DIST_SERVER : https://mirrors.ustc.edu.cn/rust-static
RUSTUP_UPDATE_ROOT : https://mirrors.ustc.edu.cn/rust-static/rustup
 
运行 init
提示没有安装编译工具
选择继续
 
选择2自定义
default host triple
x86_64-pc-windows-gnu
default toolchain
stable
modify PATH variable
yes
 
选择1进行安装
等待下载完成
 
.cargo/bin会自动添加到系统环境变量path中
手动把mignw的路径也添加到系统环境变量path中
 
测试
rustup --version
rustup update
rustup show
 
F:\>cargo new hello
Created binary (application) `hello` package
 
F:\>cd hello
 
F:\hello>cargo run
Compiling hello v0.1.0 (F:\hello)
Finished dev [unoptimized + debuginfo] target(s) in 2.69s
Running `target\debug\hello.exe`
Hello, world!
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM