邀请:@lugl4313820
参与回复
我今天在公司电脑上装了rust了,特来分享如果你没得管理员权限,一样可以畅玩cmd,mingw,等命令行工具。
先推荐@lugl4313820的Rust圣经,真的入门好东西,大家可以看看哈,link在下面
https://course.rs/print.html
window安装比较简单, 我为了不用权限所以选择MSYS2的方法。
首先,根据 MSYS2 官网 配置 MSYS。
大家可以自行搜索下MSYS的工具很好用的
我是使用的ucrt64的shell
$ curl https://sh.rustup.rs -sSf | sh
然后根据如下的配置一下
Current installation options:
default host triple: x86_64-pc-windows-msvc
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>2
I'm going to ask you the value of each of these installation options.
You may simply press the Enter key to leave unchanged.
Default host triple? [x86_64-pc-windows-msvc]
x86_64-pc-windows-gnu
Default toolchain? (stable/beta/nightly/none) [stable]
stable
Profile (which tools and data to install)? (minimal/default/complete) [default]
complete
Modify PATH variable? (Y/n)
Y
Current installation options:
default host triple: x86_64-pc-windows-gnu
default toolchain: stable
profile: complete
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>
记得添加环境变量哈
全程自动安装,安装好了
就可以在CMD验证下咯
$ rustc -V
rustc 1.56.1 (59eed8a2a 2021-11-01)你自己的版本
$ cargo -V
cargo 1.57.0 (b2e52d7ca 2021-10-21)你自己的版本
|