Let's start to practice the RUST. There is the rule. Write the code in person. Before the practice, Read the document to study the rust grammar on the docs.
I wrote detailed descriptions to do in each day's project. Read the mission and then start to write the code in your editor.
Our work directory is src. When you create the new project, Use the command such as cargo new day2
in the src directory.
days | Task | Topic |
---|---|---|
#1 | Print the "Hello, Rust!" | cargo new, cargo run |
#2 | Change the variable value | mutable variable |
#3 | Declare the variant types | Data types |
#4 | Create the functions | Function, Statements, Expressions |
#5 | Use the if statement |
Control Flow |
#6 | Use the loop statement |
Repeating Code with the loop(while, for, loop) |
#7 | Run and Read the code | Ownership |
#8 | Create the functions with the & and mut |
References, Borrowing |
#9 | Run and Read the code | Slice, String and String literals |
#10 | Make the User struct |
Defining and Instantiating Structs |