Rust 版本管理工具: rustup(rustup是系统编程语言Rust的安装程序 )
https://www.rust-lang.org/tools/install
通过curl下载并执行这个脚本
appledeMac-mini:~ apple$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
这个命令将会编译和安装 rustup, 安装过程中可能会提示你输入 sudo 的密码。 然后, 他会下载和安装 stable 版本的工具链, 当执行 rustc, rustdoc 和 cargo 时, 将会配置他为默认工具链。
Unix 上安装后工具链会被安装到 $HOME/.cargo/bin目录。
.cargo/bin目录会被添加到系统的$PATH环境变量,重新登录后即可使用rustc,cargo等命令。
问题: (网络问题多试几次)
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml' to '/Users/apple/.rustup/tmp/x3tlzua732gf0u19_file.toml'
info: caused by: error reading from socket
info: caused by: timed out
所有工具都安装到 目录中,而这正是你会发现RUST的工具链,包括,,和。 ~/.cargo/bin rustccargorustup