Skip to content

hariamoor-zz/todo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a Rusty To-Do List CLI

In this 2-week online programming tutorial, we will be building a to-do list management CLI in Rust. Each weekly lesson is served as a programming guide.

UPDATE: Part 1 now available
UPDATE: Part 2 now available

To best follow the tutorials, look at the markdown write-ups above and the source code under the src/ directory. The cli.rs file is part 1 and the other two files are part 2. The Cargo.toml file in this directory will also be mentioned and modified, but you can also take ours as-is for simplicity (we detail how it should be manipulated in our markdown).

One should be able to follow and implement the almost all the code supplied in the tutorial without it. With that said, it is intended as a reference for what idiomatic Rust code should look like.

Why Rust?

Rust is a systems-level programming langauge that values runtime safety, performance, and ergonomics. The language had its first stable release in March, 2020, and has since been used by companies like Mozilla, Facebook, and Dropbox for systems-level project where software performance and developer productivity are both equally-pressing concerns.

Rust is most famously known for the following:

  • Memory/resource safety known at compile-time (can still get logic errors)
  • Expressive type system modeled after those of languages like Haskell and OCaml
  • Absence of bloat in the runtime and compiler optimizations that result in (anecdotally) very performant binaries

We use Rust for this tutorial project, together with the CLI parser clap-rs and the serialization framework serde-rs.

Installation and Usage

To get set up with the Rust toolchain, see the Getting Started page provided on the official website.

This tutorial assumes that the user is setup with Cargo, Rustup, and an IDE/editor of his/her choice. Please refer to the Rust website or contact the maintainer(s) if any more clarification is necessary. Rust is very flexible in supporting a variety of general-purpose editors, so if you enjoy crafting your tool to fit only your hand, look out for a Rust plugin for your editor or IDE.

Tutorial Format

This will be a two-part online tutorial where, in each week, we produce some usable and testable component of software.

Part 1 will focus on setting up the CLI with clap and representing the application state with Rust's data structures. Finally, in Part 2, we will serialize and deserialize our application state (tasks in our to-do list) to disk.

We also provide asides, which are intended to provide information that is not necessary for the tutorial, but is nonetheless very useful. Please see the general asides and the Rust asides. The general asides provide information on language-agnostic design patterns, while the Rust asides discuss design patterns appropriate specifically for Rust.

Please also see PREREQUISITES.md.

Further Resources

Please also feel free to utilize the following resources provided by the maintainers and the Rust community.

Rutgers-specific Questions

Please contact the maintainers via a GitHub issue or a personal email.

Questions about Systems Programming, Type Theory, any of the asides...

Please make a GitHub issue detailing your question(s), in case others have the same ones.

Questions about Rust

We provide the following (running) list of Rust resources:

Or, as always, your caring tutorial maintainers.

About

Building a to-do list CLI in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages