My solutions to Advent of Code written in Rust
Inputs should be placed in the path input/yearXXXX/dayYY.txt
- Run everything:
cargo run
- Specific year:
cargo run year2024
- Specific day:
cargo run year2024 day04
- To run with the
release
profile (much faster):cargo run --release
orcargo run --release -- year2024 day04
The examples given in the text of each problem are used in tests.
- Run everything:
cargo test
- Specific year:
cargo test year2024
- Specific day:
cargo test year2024::day04
- Specific part:
cargo test year2024::day04::part2
- Everything:
cargo bench
- Specific year:
cargo bench year2024
- Specific day:
cargo bench year2024::day04
- Specific part:
cargo bench year2024::day04::part2
Thank you to ...
- maneatingape/advent-of-code-rust for the structure of this repo, and for large parts of the solutions
- Neil Thistlethwaite for his amazing live Advent of Code solutions on YouTube