
本篇文章记录了我是如何在Mac下安装rust的过程.
首先在你Shell的配置文件内加入下面两行:
1 |
export RUSTUP_DIST_SERVER=https://mirrors.ustc.edu.cn/rust-static |
然后打开终端,输入:
1 |
curl https://sh.rustup.rs -sSf | sh |
中间稍微等待一下,选择安装的方式即可。
安装好后记得执行:
1 |
source $HOME/.cargo/env |
最后再编辑$HOME/.cargo/config文件
1 |
[registry] |
就大功告成啦,赶快写一个HelloWorld吧!




近期评论