百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

rtd

> 开发工具
开源

通过 500 行代码学习 Rust

585 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

通过 500 行代码学习 Rust

Learn Rust by 500 lines code

English | 中文

  • RTD (Rust To Do) is a todo app cli tool write by 500 lines Rust code. (exclude space lines/comments/long line break display/test code)
  • RTD is also a tutorial, designed to learn Rust by doing.

Table of contents

  • What can you learn from rtd?
  • Prepare
  • Install
  • Usage

What can you learn from RTD?

Assuming you know nothing about Rust, through the Learn Rust by 500 lines code tutorial, step by step to build the project from scratch, you will learn:

  • Rust common syntax
  • Rust module system (package/binary crate/library crate/mod/pub/use)
  • Rust ownership model (Bernstein conditions)
  • Rust lifetime
  • Rust error/null handling model (Result/Option)
  • Rust generic
  • Rust pattern matching (if let , match ...)
  • Rust unit test
  • Rust file I/O (File Seek/Buffed File I/O)
  • Rust manipulating environment variables
  • Rust command line parameter parsing
  • Rust release package to crate.io
  • The general process of developing a program (requirements/design/implementation/testing/release/maintenance)
  • Layered abstraction (data storage layer/model mapping layer/data model layer/business logic layer/application interface layer/user interface layer)
  • Handwritten serialization/deserialization from scratch
  • Implement the recycle bin function (virtualization concept)
Architecture
Storage

Use a local file $HOME/.rtd.csv store all data

After completing this tutorial or installing RTD directly, you will get:

  • Extremely lightweight and concise todo command line application
  • Cross-platform, Rust's excellent build system naturally supports cross-platform
  • Safe, supports recycle bin, completely local, no network, no database
  • All data storage uses only one local csv file, which can be switched between different machines by copying the csv file

Interesting fact: I use RTD to complete the RTD tutorial :)

If you like my tutorial, don't forget to give me a star~


Prepare

  • Rust is naturally cross-platform. This project is built and tested in the linux environment, and Windows/MacOS are also supported. You can choose to download the corresponding Cargo according to your own operating system.
  • Cargo Rust's package management and build tool, can be installed directly through the Rust official website rustup one line command. Then, all things will be done by Cargo, so cute, right?

Install

Via crate.io :

bash
cargo install rtd-tutorial

Or via git repo :

bash
git clone https://github.com/cuppar/rtd.git
cargo install --path rtd

Usage

View help document

bash
rtd -h
rtd --help

Add a todo

bash
rtd -a 
rtd --add 

List all uncompleted todos

bash
rtd
rtd -l
rtd -l uncompleted
rtd --list
rtd --list uncompleted

Complete a todo

bash
rtd -c 
rtd --complete 

List all completed todos

bash
rtd -l completed
rtd --list completed

Uncomplete a todo

bash
rtd -u 
rtd --uncomplete 

Throw a todo into the recycle bin

bash
rtd -d 
rtd --delete 

List all recycle bin todos

bash
rtd -l deleted
rtd --list deleted

Restore a todo from the recycle bin

bash
rtd -r 
rtd --restore 

Physically destroy a todo

bash
rtd --destroy 

Empty recycle bin

bash
rtd --destroy-deleted

List all todos

bash
rtd -l all
rtd --list all

Clear all todos

bash
rtd --clear

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustcli-applearning-by-doingruststep-by-step-guide

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具