This homework assignment is about getting used to programming in Rust with a small yet substantial project! The project is implementing a complete self-contained simulation of a file system with a custom CLI interface!
As this project is quite all encompassing as it goes for foundational Rust features, you will need to make good use of your reading resources! With what truly little time we have in class, you will need to rely on the reading material to get you the full picture. The sections below give you direct and indirect help with organizing your thoughts about structs, memory management, and references in Rust.
In "The Rust Language Book" read:
Optionally for help with the homework:
(These are a bit of a stretch goal, but it will help you understand the concepts of the homework better)
While it's not one of your required materials, the Rust by Example docs are associated with the Rust Language Book and are a great resource for understanding the concepts in the book in a more direct programmatic way. You should go through all of it but for now, Read section 3: Custom Types and Section 9: Functions.
Watch the later half of this amazing guided talk about data-driven programming by Nic Barker! While it's not in Rust (It's in C# for Unity), the concepts are universal and will help you understand the importance of structuring your data in a way that makes the best use of your resources! (The link should take you to the correct time stamp, but if it doesn't, skip to 25:50. The previous content is still good, but it is mostly review of general programming concepts)
This programming assignment is about implementing a complete self-contained simulation of a file system with a custom CLI interface!
Your repository will contain the following files:
CMSI-3510-HW1/
āāā .gitignore
āāā doughmain_expansion/
ā āāā Cargo.toml
ā āāā src/
ā āāā cli_commands/
ā ā āāā mod.rs
ā ā āāā cd.rs
ā ā āāā ls.rs
ā ā āāā mkdir.rs
ā ā āāā pwd.rs
ā ā āāā rmd.rs
ā ā āāā rmf.rs
ā ā āāā touch.rs
ā ā āāā signin.rs
ā ā āāā signout.rs
ā ā āāā read.rs
ā ā āāā write.rs
ā āāā lib.rs
ā āāā main.rs
āāā README.md
Need a refresher on how to interact with the HW for this course? Watch the helper video posted to Zoom via the link below!
You can find the GitHub Classroom assignment link and the Brightspace turn in link using the buttons at the top of this section.
In this optional section you will be working on a small beginner Rust project of your choosing! After looking around for some fun project ideas, I found this great article from ZTM.io's Jayson Lennon!
Jayson Lennon's Rust Practice Projects
Whilst the intermediate and advanced projects are certainly "out of our league" at the moment, the beginner projects Jayson lays out are insightful, simple, and fun!
For this optional I want you to read that article and pick one of the beginner projects that Jayson recommends! Complete the basic implementation of the project and then provide at least 5 to 10 unit tests that display your implementations working as expected.
I have made an empty Github assignment for you to pull and create your Rust project from scratch (This is out of convenience so that I can use Github classroom to collate all your projects rather than go through being added to all the repos). Feel free to architect your project as you choose, however at a minimum you must have at least 5 unit tests that are run and pass with the cargo test command.
Additionally, provide a brief README.md file that explains what project you chose and how to interact with it. If you are doing anything "non-standard" that is Ok, just document that in the README.md.
Since the repository is private, feel free after you are done to copy it over into a public repository to show off on your Github!
Earning points in this optional is not as rigid since you may pick your own project. With that said, to earn full points you must fully implement one of the beginner projects as stated by Jayson, have a README.md, and have at a minimum 5 unit tests pass with the cargo test command. You do not have to do any of the add-ons or extensions that Jayson recommends.
As an example, if you did the beginner project about remaking core terminal utilities than I would expect to be able to run your version of echo, cat, ls, find, and grep, that I could figure out where to start by looking at your project README (Your commands don't need to be terminal integrated or anything, but there functionality should be intact through whatever medium you choose), and that I could clone the repository to run cargo test and see at least 5 passes (In this case one for each command).
Below are buttons that link to the Github Optional Assignment repository. The Brightspace submission link is at the top of this section.