My Rust solutions for Advent of Code.
Note: Make sure to run all commands in this README from this rust
-folder.
Install Rust for your platform and make sure cargo
is available.
To run all solutions for the current edition:
cargo run
To run solutions for specific days, pass one or more days as arguments:
cargo run 1 2
To run solutions for a different edition, specify the year:
cargo run 2019
cargo run 2019 1 2
To run a combination of solutions from different editions, mix and match years and days, reading from left to right.
Example to run 2019 all days, and 2021 day 2:
cargo run 2019 2021 2
TODO.
To monitor code changes and re-run solutions during development, first:
cargo install cargo-watch
Then:
cargo watch -x "run 2019 2"
TODO.
To run tests for utilities:
cargo test