Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rust 安装及配置 #11

Open
TheBigFish opened this issue Jan 3, 2019 · 0 comments
Open

rust 安装及配置 #11

TheBigFish opened this issue Jan 3, 2019 · 0 comments
Labels
Rust Rust language

Comments

@TheBigFish
Copy link
Owner

rust 安装及配置

配置参数

vi ~/.bashrc

#add
export CARGO_HOME="~/.cargo/"
export RUSTBINPATH="~/.cargo/bin"
export RUST="~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu"
export RUST_SRC_PATH="$RUST/lib/rustlib/src/rust/src"
export PATH=$PATH:$RUSTBINPATH

修改源

.basrc

vi ~/.bashrc
#add
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static
export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup

config

vi ~/.cargo/config
#add
[source.crates-io]
replace-with = 'ustc'

[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

ch02-00-guessing-game-tutorial.md 编译错误

// main.rst 文件顶部增加

extern crate rand;
@TheBigFish TheBigFish added the Rust Rust language label Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Rust language
Projects
None yet
Development

No branches or pull requests

1 participant