Rust安装及配置

下载rustup 从此处下载 设置rustup镜像 字节提供的镜像 https://rsproxy.cn export RUSTUP_DIST_SERVER="https://rsproxy.cn" export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" 设置两个环境变量即可 设置环境变量 RUSTUP_DIST_SERVER (用于更新 toolchain) export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static 以及 RUSTUP_UPDATE_ROOT (用于更新 rustup) export RUSTUP_UPDATE_ROOT=https://mirrors.ustc.edu.cn/rust-static/rustup crates.io 镜像 编辑 ~/.cargo/config [source.crates-io] replace-with = 'rsproxy' [source.rsproxy] registry = "https://rsproxy.cn/crates.io-index" [registries.rsproxy] index = "https://rsproxy.cn/crates.io-index" [net] git-fetch-with-cli = true 安装Rust 安装rust即可。可以参考我的步骤 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....

February 28, 2022 · 3 min · czyt