rust-exercises
rust-exercises copied to clipboard
Exercises for learning Rust, by Ferrous Systems
In Shapes the [`Circle` area requires `PI` which in the solution uses PI at the end](https://github.com/ferrous-systems/rust-exercises/blob/main/exercise-solutions/shapes-part-3/src/lib.rs#L67). But if you change the order ```rust std::f32::consts::PI.into() * self.radius * self.radius ``` This...
Given via direct feedback during training.
We still need a collections exercise. Maybe something about read lines from stdin into a Vec, sorting the Vec, and printing the lines out again. Then doing the same but...
A deck of cards is an interesting way to show ownership, because a deck has 52 cards and cards cannot be cloned or copied (unless you are cheating). The suits...
Adds a new exercise introducing `writeln` and `write_fmt`. Also moves the QEMU UART Driver exercise, and make the ToC look better.
This line: https://github.com/ferrous-systems/rust-exercises/blob/dd422740c21c6d8a24534638a0483f61eee8b8e0/nrf52-code/radio-app/src/bin/radio-puzzle-1.rs#L36 should read: ```rust let output = data[0]; ``` Not `packet[0]`. It will compile, but you'll get the first byte of the reply address and not the first...
There's some cool examples that we can pick up on * [Alex Crichton's](https://www.youtube.com/watch?v=bnnacleqg6k) Bound and unbound iterator * The type-safe [state machine](https://hoverbear.org/blog/rust-state-machine-pattern/), and Jon Gjengset's Rust for Rustacean's example *...
Add the [1brc](https://github.com/coriolinus/1brc/blob/main/src/bin/generate.rs) problem to our training exercises
There are still some links to https://embedded-trainings.ferrous-systems.com
JP asked, JP gets. https://github.com/ferrous-systems/rust-exercises/blob/main/nrf52-code/usb-app/src/bin/usb-1.rs