rustup
rustup国内镜像
设置环境变量
RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup
更新
rustup update stable
Cargo
cargo new foo_project
cargo build
cargo run
Cargo.toml
[package]
name = "foo"
version = "0.1.0"
authors = ["Your Name <you@example.com>"]
edition = "2018"
[dependencies]
国内源
~/.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"
VS Code插件
crates
CodeLLDB
rust-analyzer
TOML Language Support
Rust Test Explorer
官方Rust插件可选。