In this Rust course repository you will find all the code that was written during lectures as well as the exercises that should be done by you.
Code from lectures is located in lecture_name/src/main.rs;
Code for exercises that should be done by you is located in lecture_name/examples/exercise_name.rs;
You can run all of the code from lectures like this:
- Clone the repo
git clone https://github.com/Web3-Academy-Rust-Course/rust-course-part-one.git- Navigate to the lecture directory
cd rust-course-part-one/lecture_name- Run lecture code
cargo runExercises are set in examples directory of every lesson and they are compiled only when you run certain example, thus you won't get compiler error every time you run cargo. To work on specific exercise and run it:
- Clone the repo
git clone https://github.com/Web3-Academy-Rust-Course/rust-course-part-one.git- Switch brach from main -> solutions
git checkout solutions- Navigate to the lecture directory
cd rust-course-part-one/lecture_name- Run specific exercise
cargo run --example exercise_nameIf you have done exercise well it will compile and run with no errors, if not the compiler will provide you with helpful compiler error messages and you can fix the code and re-run it again, try to do every exercise properly without cutting corners, and if you are stuck on some part you can check solutions on the separate branch in this repo.