Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/Users/sjl/.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory located at:
/Users/sjl/.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo’s bin directory, located at:
/Users/sjl/.cargo/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/Users/sjl/.profile
/Users/sjl/.zprofile
/Users/sjl/.bash_profile
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-apple-darwin
default toolchain: stable (default)
profile: default
modify PATH variable: yes
在运行cargo build过程中可能会由于crates下载耗时很长,可以通过国内的镜像解决。具体方式如下
vi ~/.cargo/config
[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"
Rust依赖Linux的C编译器
yum install gcc
yum install cmake