This repository contains exercises accompanied by the Rust Workshop Presentation.
Presentation Slides:
(Excercise Solution Branch: here.)[https://github.com/sdsc-ordes/rust-workshop/tree/feat/solutions]
- Read the setup guide and make sure you can compile the test application.
Any exercise has a small README.md with additional information to it.
To see all exercises use:
just list-exercisesYou can build any exercise in ./exercises with the tool cargo
by doing
cd ./exercises/basic-syntax
cargo buildUse cargo test, cargo run to test and run the executables in the small
exercise projects.
Note
An exercise might contain multiple executables:
By default all are built. Use --bin <executable-name>
to build a specific one, e.g. cargo build --bin 01 in the above example.
Tip
Use the nicer just targets:
just build <exercise-name> [build|test|check|run] [add-cargo-args...]`so you can do
just build basic-syntax --bin 01or
just watch [build|test|check|run] basic-syntax --bin 01to continuously build/test/run any exercise.
The solutions to most exercises are on the branch feat/solutions and you can
simply use git diff HEAD...feat/solution -- <path> where <path> is the path
to a Rust file you are interested in looking at the solution.
Special thanks to teach-rs for providing exercises and slides which this whole workshop is based on.
Also some parts have been taken from comprehensive-rust. This course is more tailored towards C/C++ intermediates.