Advent of Code
This repo contains my solutions for the Advent of Code problems, along with a runner for the solutions. The structure of repo runner was more or less copied from Linus Färnstrand's solutions for Advent of Code 2016.
aoc/contains the runner, which is the main entry point for running the solutions.base/contains (right now) some shared interfaces, and will probably later contain some shared utility structs and enums that can be reused between problems.yearNNNN/contains the crate for the solutions to the problems for year NNNN.
Usage
Make sure you have Rust installed. I have used stable Rust, but my solutions should probably work fine with both stable, beta, and nightly Rust. You should preferrably use rustup to install Rust.
- Run
$ cargo build(if you want the optimized version, run$ cargo build --release) - Run
$ cargo run -p aoc -- <year> <day> <part> <input file>, e.g.$ cargo run -p aoc -- 2017 4 2 ../inputs/2017/04to run year 2017, day 4, part 2, on the file../inputs/2017/04. (Again, if you want the optimized version, usecargo run --release -p aoc).