脚本宝典收集整理的这篇文章主要介绍了win10安装Rust+VS Code配置Rust环境,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Rust Playground(在线IDE):https://play.rust-lang.org/
进入:https://www.rust-lang.org/tools/install
点击“DOWNLOAD RUSTUP-INIT.EXE(64-BIT)”下载rustup并安装。默认安装会帮助我们安装:
进入:https://code.visualstudio.com/
点击“Download for Windows”下载vs code并安装。
vs code中安装如下扩展:
cargo run
时报错:
PS D:projectshello_world> cargo run
Compiling hello_world v0.1.0 (D:projectshello_world)
error: linker `link.exe` not found
|
= note: program not found
note: the msvc targets depend on the msvc linker but `link.exe` was not found
note: please ensure that VS 2013, VS 2015, VS 2017 or VS 2019 was installed with the Visual C++ option
error: could not compile `hello_world` due to previous error
解决办法:在终端依次运行如下两条指令:
rustup toolchain install stable-x86_64-pc-windows-gnu
rustup default stable-x86_64-pc-windows-gnu
以上是脚本宝典为你收集整理的win10安装Rust+VS Code配置Rust环境全部内容,希望文章能够帮你解决win10安装Rust+VS Code配置Rust环境所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。