advent_of_code_traits 0.2.0

Minimal, flexible framework for implementing solutions to Advent of Code in Rusts
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# CLI example

An example main function to run your solutions from the command line.

e.g. to run day 1
`cargo run --example cli 1`

3 days are implemented. Check each of them for a different demonstration of implementating the Solution trait:
* `day01.rs` implements Solution with both part1 and part2 implemented and **different input types** for each
* `day02.rs` implements Solution with both part1 and part2 implemented using a **shared input type**
* `day03.rs` implements Solution **only for part1** and marks part2 as unimplemented using the MissingPartTwo trait

`main.rs` loads input from a file and run the Solution with that input for the day provided as an argument.

Try running the example passing the argument `2`, `3`, or `4`.

You could extend this example by taking the year as an argument as well as the day.