You can run the tests either in vscode by clicking Run / Run Tests inline in the rs files. Alternatively you may use cargo run
/ cargo test
to execute the assignments.
All exercises require you to create an implementation for them. Some require you to add arguments to the function in order to match the tests.
Example with one variable, reader has to add another with a different type Try to modify the variable after declaration and print the new value
Introduces function syntax and implicit return line. This exercise is split in 4 parts to help you run tests before all code is valid rust syntax. Note that tests have to be enabled to validate your implementation!
Introduction of strings, managed in heap and immutable references somewhere in memory.
The Cargo exercise, can you trim a rust binary to a smaller size? Add compiler flags to strip information you do not need to run the binary. In the solution of this exercise we have a creative work around to trim it down, can you approach that?
Larger exercise to put all learnings into action.
- Library implementation to manage books
- Use rustdoc to view documentation on the code
- Run clippy to check your code (
cargo clippy
) - Create a test that verifies the oldest book in the library