No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aoc
base
inputs
template
year2016
year2017
year2018
.gitignore
Cargo.lock
Cargo.toml
README.md
new_day

README.md

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.

  1. Run $ cargo build (if you want the optimized version, run $ cargo build --release)
  2. Run $ cargo run -p aoc -- <year> <day> <part> <input file>, e.g. $ cargo run -p aoc -- 2017 4 2 ../inputs/2017/04 to run year 2017, day 4, part 2, on the file ../inputs/2017/04. (Again, if you want the optimized version, use cargo run --release -p aoc).