推荐一个 Rust 语言练习网站 exercism.org

推荐一个 Rust 语言练习网站 exercism.org

  1. exercism.org
  2. 命令行使用方法

exercism.org 简介

exercism.org 提供了一个很好的做 Rust 练习的环境(当然不仅是Rust 语言,
还有其它语言。) 它可以让用户提交练习, 自动测试。 如果对练习不理解,不
可以看下其他用户提交上来的练习, 很有帮助。

命令行使用方法

exercism.org 提供了在线编辑器, 可以直接在网页上编辑代码并提交。

online editor

其他开发者上传的解题方法:

community

它也提供了命令行方式, 可以把练习下载到本地, 做完之后再提交到网站。 这是命
令行

install exercism package by using snap

sudo snap install exercism

set the token

exercism configure --token=<your-api-token>

is in my settings in exercism.org .

Download the exercise

exercism download --exercise=<exercise-slug> --track=<track-slug>

and can be found in the page of the
exercise. For example:

exercism download --exercise=reverse-string --track=rust

default download location is
$HOME/snap/exercism/5/exercism/rust/, then I can goto this
directory, and run

cargo test

submit exercism:

cd $HOME/snap/exercism/5/exercism/rust/reverse-string
exercism submit src/lib.rs

再返回到 exercism.org, 可以看到 reverse-string的 src/lib.rs 已经上传
了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值