Advent of Code solutions in Rust.
Common utilities are defined in src/lib.rs.
Day implementations are defined in src/bin/.
Pass the day binary to cargo run
and pass the input through stdin
.
For example, to run day1
with the input saved in resources/day1.txt
:
$ cargo run --bin day1 < resources/day1.txt
$ cargo test
To test a specific day (e.g. day1
):
$ cargo test --bin day1