初试Rustlings-Rustlings安装部署和尝试
今天在互联网闲逛的时候无意中发现了Rustlings这个项目,刚好最近有在打算学习Rust,于是抱着试试的心态尝试了一下
安装
推荐使用官网的手动安装方法
- Clone官方的仓库
1
2
3# find out the latest version at https://github.com/rust-lang/rustlings/releases/latest (on edit 5.6.1)
git clone -b 5.6.1 --depth 1 https://github.com/rust-lang/rustlings
cd rustings - 用cargo安装
1
cargo install --force --path .
- 最后运行rustup
建议挂梯子,否则可能非常漫长1
rustup update
使用
官方文档给出了具体的命令,详情查阅官网下的Doing exercises部分
- 在安装目录下打开终端,输入
rustlings watch启动Rustlings,本人这里使用了VScode内置的终端来方便使用
- 根据命令行提示完成对应练习,练习用的rs文件在目录下的
/exercises/文件夹内,rustlings在检测到文件变动后会自动编译检查。 - 完成练习后删除注释中的
I AM NOT DONE来进行下一个练习
总结
目前本人只是简单完成了2、3个练习内容,后续的进度也会在博客中及时更新 大概
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Protected-Site-00!
评论


