Write a safe system in rust!

1. Task
Write a Safe System in Rust! My idea is a create a game like sudoku. Using some kind of interface? maybe using a GUI interface?
2. Deliverables
Documentation outlining your system.
Code base
Video demonstration of your system, doesn’t need any voice.
4. Topics
Game development using https://macroquad.rs/ or https://bevyengine.org/. There is more about the state of Rust gamedev libraries at https://arewegameyet.rs/.
Front-end web development that creates websites by compiling Rust to Webassembly, which is then run in the browser (so your Rust code runs in the browser instead of JavaScript!) using https://yew.rs/ or https://seed-rs.org/.
Back-end web development using https://rocket.rs/ or one of the many other web server frameworks out there for Rust; I would suggest using a synchronous rather than async framework (so not Actix) unless you are really motivated!
GUI development using https://github.com/emilk/egui for an immediate-mode GUI (this is comparable to Dear ImGui for C++ if you know that) or perhaps https://github.com/iced-rs/iced or https://relm4.org/. See https://crumblingstatue.github.io/hexerator-book/ as an example of a program using egui.
TUI (text user interface) development using https://github.com/Gyscos/Cursive or https://github.com/fdehau/tui-rs.
Command-line applications that do not have a TUI: don’t really need anything beyond parsing command-line arguments (and https://kbknapp.github.io/clap-rs/clap/index.html is great for that).
With the exception of game development, those are more about user interfaces to a program/system rather than saying what the program/system does. That is still up to you. For example, it could be:
a custom application to process files (ROM sorter, photo manager, etc.)
a simple emulator for an old system (or for WebAssembly for that matter)
a distributed system, e.g., something with cloud services, chat, a bot for Matrix, Discord, etc.
for more ideas, browse https://github.com/rust-unofficial/awesome-rust
You will need to strike a balance between user interface and application domain. For example, if you focus more on application domain, e.g., a distributed system or files/processes, then you will not have time to write a complex user interface. On the other hand, if you have a simple application domain, then spend more time on the user interface.
5. Goals and Constraints
Learning more about APIs using ownership, borrowing, generics, and traits is encouraged.
So it is encouraged to use existing crates to:see more examples of (hopefully) well-designed APIs and to find out how usable they are
allow you to achieve more
You must write your own code, but you can use external crates and you are encouraged to discuss your project with other students in the class and provide mutual suppocrt

Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:vec

WRITING CODE
When you are asked to write a program in the questions below, you should write one Rust source code file that lives in the code/plain/src/bin/ directory, has a mainfunction, and can be run with cargo run –bin foo (where foo.rs is the name of the Rust source code file). Do not use any additional crates in your solutions.
QUESTION: DATA LAYOUT
Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:Vec
&[u8]
Box
Box<&u8>
Box<[u8]>
Box<&[u8]>
Box>
Box<[u8; 4]>
[Box; 4]
[Option; 4]
Vec<[u8; 4]>
Use Debug formating with {:?}) to print each value. Your program must have a main function.
For each of the following types, draw a diagram to illustrate the data layout in memory when a local variable x contains a value of that type.&[u8]
Box
Box<&u8>
Vec<[u8; 4]>
You can draw your answers on paper, take photos, and include them in your PDF.
Write one program examlayout2.rsthat, for each of the following types, creates a value of that type and then prints out all of the memory addresses used to store the value. In particular, your program should print out the memory addresses used on the stack and on the heap. You must print out the memory addresses, and you can print out the contents of those memory addresses if you like.Box
Vec

Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:vec

WRITING CODE
When you are asked to write a program in the questions below, you should write one Rust source code file that lives in the code/plain/src/bin/ directory, has a mainfunction, and can be run with cargo run –bin foo (where foo.rs is the name of the Rust source code file). Do not use any additional crates in your solutions.
QUESTION: DATA LAYOUT
Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:Vec
&[u8]
Box
Box<&u8>
Box<[u8]>
Box<&[u8]>
Box>
Box<[u8; 4]>
[Box; 4]
[Option; 4]
Vec<[u8; 4]>
Use Debug formating with {:?}) to print each value. Your program must have a main function.
For each of the following types, draw a diagram to illustrate the data layout in memory when a local variable x contains a value of that type.&[u8]
Box
Box<&u8>
Vec<[u8; 4]>
You can draw your answers on paper, take photos, and include them in your PDF.
Write one program examlayout2.rsthat, for each of the following types, creates a value of that type and then prints out all of the memory addresses used to store the value. In particular, your program should print out the memory addresses used on the stack and on the heap. You must print out the memory addresses, and you can print out the contents of those memory addresses if you like.Box
Vec

Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:vec

WRITING CODE
When you are asked to write a program in the questions below, you should write one Rust source code file that lives in the code/plain/src/bin/ directory, has a mainfunction, and can be run with cargo run –bin foo (where foo.rs is the name of the Rust source code file). Do not use any additional crates in your solutions.
QUESTION: DATA LAYOUT
Write one program examlayout1.rsthat, for each of the following types, creates a value of that type and then prints it:Vec
&[u8]
Box
Box<&u8>
Box<[u8]>
Box<&[u8]>
Box>
Box<[u8; 4]>
[Box; 4]
[Option; 4]
Vec<[u8; 4]>
Use Debug formating with {:?}) to print each value. Your program must have a main function.
For each of the following types, draw a diagram to illustrate the data layout in memory when a local variable x contains a value of that type.&[u8]
Box
Box<&u8>
Vec<[u8; 4]>
You can draw your answers on paper, take photos, and include them in your PDF.
Write one program examlayout2.rsthat, for each of the following types, creates a value of that type and then prints out all of the memory addresses used to store the value. In particular, your program should print out the memory addresses used on the stack and on the heap. You must print out the memory addresses, and you can print out the contents of those memory addresses if you like.Box
Vec

Write one program examlayout2.rs that, for each of the following types, creates a value of that type and then prints out all of the memory addresses used to store the value.

Writing Code
When you are asked to write a program in the questions below, you should write one Rust source code file that lives in the code/plain/src/bin/ directory, has a mainfunction, and can be run with cargo run –bin foo (where foo.rs is the name of the Rust source code file). Do not use any additional crates in your solutions.
Question: Data Layout
Write one program examlayout1.rs that, for each of the following types, creates a value of that type and then prints it:Vec
&[u8]
Box
Box<&u8>
Box<[u8]>
Box<&[u8]>
Box>
Box<[u8; 4]>
[Box; 4]
[Option; 4]
Vec<[u8; 4]>
Use Debug formating with {:?}) to print each value. Your program must have a main function.
For each of the following types, draw a diagram to illustrate the data layout in memory when a local variable x contains a value of that type.&[u8]
Box
Box<&u8>
Vec<[u8; 4]>
You can draw your answers on paper, take photos, and include them in your PDF.
Write one program examlayout2.rs that, for each of the following types, creates a value of that type and then prints out all of the memory addresses used to store the value. In particular, your program should print out the memory addresses used on the stack and on the heap. You must print out the memory addresses, and you can print out the contents of those memory addresses if you like.Box
Vec

Write a simple interactive program examinter.rs that plays a very simple text adventure game with the user.

Writing Code
When you are asked to write a program in the questions below, you should write one Rust source code file that lives in thecode/plain/src/bin/ directory, has a main function, and can be run with cargo run –bin foo (where foo.rs is the name of the Rust source code file). Do not use any additional crates in your solutions.
Question: File/Strings
Write a program examfile.rs that opens a file and prints out the lines of the file (with line numbers) if the line contains “the” (lowercase only). The file to open should be given as the first command-line argument to your program. The line numbers printed should be the original line numbers in the file, before restricting to the lines containing “the”.Your output should be equivalent to running cat -n | grep the. That is, suppose the file examfile.txt contains:the rain
in spain
falls
mainly
on the
plain
Then your output should be the same as:$ cat -n examfile1.txt | grep the
1 the rain
5 on the
(you do not need to worry about padding numbers or anything like that; just put two spaces between the line number and the line text).
Question: Simple Interactive Program
Write a simple interactive program examinter.rs that plays a very simple text adventure game with the user. If you are unfamiliar with text adventure games, play Zork online for a few minutes. Your adventure game should have at least four locations, and the user should be able to go between them using go north, go south, go east, go west, etc. if the locations are connected in that direction. Your program should print a description of the location whenever you enter that location (via a go command). Hints: number each location; store the location descriptions in, say, a Vec; number each direction (e.g., 0 is North, 1 is East, etc.) and then have a paths:Vec<[Option;4]> structure that stores whether or not there is a path leading from a location and which location it goes to, i.e., paths[i][d] = Some(j) if you can go in direction dfrom location i and end up in location j; and paths[i][d] = None if you cannot go in direction d from location i.