This repository is part of the Rust Fundamentals Coursera course and Systems Engineering specialization by Duke University
Rust Bootcamp week 2: Rust Fundamentals
This week, you will learn how to create a Rust project using Cargo and how all files and components work together. Additionally, you will understand variables, assignment, and controlling flow with logic, loops and other conditional statements. Finally, you'll create functions and get used to the borrowing concept in Rust as well as working with error handling using match
.
This is week 2 of the Rust Bootcamp. There are 4 weeks in total:
💡 Are you just looking for a 👉 Rust template to get started easily with a project? The template has everything you need!
🚀 Watch the Video course
This week has several examples located in the ./examples directory. Make sure you have Rust installed and you are using Visual Studio Code.
This repository is Codespaces ready, and it is set as a template repository. You can create a new repository from this template and start working on your own with Codespaces. This means that Rust, Copilot, and all the extensions are already installed and configured for you.
- Overview of project files
- Variable assignment and immutability
- Basics of control flow
- Shadowing variables
- Introduction to loops in Rust
- Conditional statements
- The while loop
- The for loop
- Break and continue
- The match expression
- Introduction to functions
- Return values
- Function arguments
- The borrowing concept
- Using Panic!
- Error handling with match
Use the included practice lab to apply the content you've learned in this week. Follow the steps to create your own repository and apply the requirements to complete the lab.
Coursera Courses