0% found this document useful (0 votes)
14 views4 pages

Rust Project

The document outlines five programming projects in Rust, each focusing on different utilities and applications. Projects include creating CLI utilities, a todo list, a budget manager, a unit converter, and a custom data structure, with specific features and enhancements suggested for each. Additionally, all projects must include testing to validate code efficiency.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Rust Project

The document outlines five programming projects in Rust, each focusing on different utilities and applications. Projects include creating CLI utilities, a todo list, a budget manager, a unit converter, and a custom data structure, with specific features and enhancements suggested for each. Additionally, all projects must include testing to validate code efficiency.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Projet 01 : CLI utilities

Programmez en Rust les commandes ci-aprés :


• Pr01-1 : [ echo, cat ]
• Pr01-2 : [ ls ]
• Pr01-3 : [find]
• Pr01-4: [cp, mv]
• Pr01-5 : [which, who]
• Pr01-6: [grep]
• Pr01-7: [touch]
• Pr01-8: [mkdir]
• Pr01-9: [cal]
• Pr01-10: [tail,head]

Todo:
• Add extra flags to the tools to enhance their feature set
• Use proper error handling so the programs don’t end prematurely
(no .unwrap() and no .expect())
• Add multi-threading support. find and grep are good candidates for this
• Add colorized output

Project 02: Todo list


You can choose to use a CLI with clap, or make it interactive using the crates
listed below. You can even do both!
The todo list minimal feature set includes:
• Add, remove, edit todos
• Mark todos as “done”
• Save and load todos
Here are some crates to get you started:
• console (Interface with terminal)
• dialoguer (Terminal user prompting)
• tui (Interactive terminal UI)
• rusqlite (Connect to SQLite databases)
• Pr02-11 : basic Todo list with clap crates.
• Pr02-12: Todo list with tui.
• Pr02-13: Todo list with database (sqlite)

1
Figure 1: Todo List

Project 03: Budget manager


A budget manager is a project that can be useful for keeping your finances
in check, while also improving your Rust programming skills. Learning about
databases is an important skill, and this project is a great entry point for
databases thanks to its limited scope.
For an initial interface, you can use clap to handle CLI flags and arguments, but
you can also go interactive using the crates listed later in this section.
The budget manager minimal feature set includes:
• Add, remove, edit a budget
• Add, remove, edit transactions associated with a budget
• Display how much money is remaining in a budget
• Handle more than one budget
Here are some crates to get you started:
• console (Interface with terminal)
• dialoguer (Terminal user prompting)
• tui (Interactive terminal UI)
• rusqlite (Connect to SQLite databases)

2
• Pr03-14
• Pr03-15

project 04: Unit converter


A unit converter provides useful functionality, and is a nice way to get familiar
with converting between different data types in Rust. An argument-based CLI
using clap is a great starting point for this application.
Here are some crates to get you started:
• console (Interface with terminal)
• dialoguer (Terminal user prompting)
• tui (Interactive terminal UI)
Level up your skills and your Unit Converter project with extra fea-
tures:
• Use new types for each unit
• Add conversion functionality using the From trait to make your code more
robust
• Add conversions for lots of units
• Add an “expression” option where the user can type a conversion expression
– Example: 10C -> F would convert 10° Celsius to Fahrenheit
– If the units are ambiguous, display an error message showing potential
matching units so the user can correct the expression
You must choose at least ten units to be converted.
• Pr04-16
• Pr04-17

Project 05 : Datastructure
Choosing the correct data structure is one of the most important tasks when
creating programs. Writing your own data structure is a great way to gain a
deeper understanding of how they work.
You could try creating an ordered HashMap, or a concurrent Queue, a binary
search tree, or a persistent data structure.
Here are some crates to get you started:
• petgraph (Helps make graph data structures)
Level up your skills with extra features:
• Write a developer-friendly API to use your data structure
• Write documentation comments for the entire crate

3
• Benchmark your data structure against similar ones in the ecosystem
• Pr05-18
• Pr05-19
Nb: every project must incorporate the test part to validate the effe-
ciency of the developped code

You might also like