My solutions to Eric Wastl's Advent of Code :)
This repo is a single rust crate, advent-of-code
, and is organized mostly according to those conventions; my solutions are located in src
and organized by year and day, so you can find my solution to e.g. day 9 of 2015 in src/2015/09.rs
. Each solution is tested in tests/integration.rs
(via some write-only macro_rules!
magic) and additionally there's some unit tests for certain parts of certain days that had more complex internal logic; those tests are colocated in the source files alongside the logic that they're testing.
The meta
subfolder in src
contains things that are more structural to advent of code, rather than anything related to a specific problem. The common
subfoleder contains types and traits that are useful for more than one problem, e.g. 2015's days 6 and 18.
To comply with Eric's rules about copying, I don't copy any text from the problems in my solutions or provide my puzzle inputs.
The crate also has a binary, which you can run with just run <YEAR> <DAY> <PART> < path/to/input
. To see all available commands, run just
with no arguments.