Skip to content

sdsc-ordes/rust-workshop

Repository files navigation

Rust Workshop

This repository contains exercises accompanied by the Rust Workshop Presentation.

The presentation slides can be watched here:

Preliminaries

  • Read the setup guide and make sure you can compile the test application.

Build & Test & Run Exercises

Any exercise has a small README.md with additional information to it.

To see all exercises use:

just list-exercises

You can build any exercise in ./exercises with the tool cargo by doing

cd ./exercises/basic-syntax
cargo build

Use 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 01

or

just watch [build|test|check|run] basic-syntax --bin 01

to continuously build/test/run any exercise.

Acknowledgment

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.