晾棋砷 发表于 2025-11-22 00:15:06

Rust环境搭建

步骤一:设置 Rustup 镜像, 修改配置~/.zshrc

export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"

步骤二:安装 Rust(请先完成步骤一的环境变量导入并 source rc 文件或重启终端生效)
curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh

步骤三:设置 crates.io 镜像, 修改配置 ~/.cargo/config,已支持git协议和sparse协议,>=1.68 版本建议使用 sparse-index,速度更快


replace-with = 'rsproxy-sparse'

registry = "https://rsproxy.cn/crates.io-index"

registry = "sparse+https://rsproxy.cn/index/"

index = "https://rsproxy.cn/crates.io-index"

git-fetch-with-cli = true
来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!

孜稞 发表于 3 天前

yyds。多谢分享

僭墙覆 发表于 前天 16:18

不错,里面软件多更新就更好了

沃盼盼 发表于 前天 22:23

鼓励转贴优秀软件安全工具和文档!
页: [1]
查看完整版本: Rust环境搭建