Rust template with layout prepared for Advent of code 2022. Created to be used to learn Rust.
-
First install
rustup
andcargo
from this page. -
Consider VS Code and rust-analyzer plugin as development environment.
- Run all the tests with cargo
cargo test
- Run specific test with cargo
cargo test verify_error_handling_not_ok
, to run this test anywhere in your code. - Run specific test with VS Code.
December first is prepared with:
src/dec01/solution.rs
src/dec01.rs
test/dec01tests.rs
- Added row for dec01 module in
src/lib.rs
For December 2 and forward just create the three equivalent files above and add module in src/lib.rs
.
- Test code/days individually with
cargo test
- Read and parse files example
- Modularize so that previous solutions can be reused without making a mess
- Demo concurrency with async await abstraction
- Demo errorhandling with Result