Advent of Code 2018 in Rust
Switch branches/tags
Nothing to show
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.
bin
inputs Add day11 Dec 11, 2018
src Add day11 Dec 11, 2018
.gitignore Cleanup and commit inputs Dec 6, 2018
Cargo.lock Adding days 7, 8, and 9 Dec 9, 2018
Cargo.toml Adding days 7, 8, and 9 Dec 9, 2018
Justfile Add day11 Dec 11, 2018
LICENSE.txt
README.md Cleanup and commit inputs Dec 6, 2018
algorithmia.conf Algorithmia initial commit Nov 30, 2018

README.md

Overview

Advent of Code 2018 solutions in Rust that are live on the Algorithmia API.

Usage

Input

Parameter Description
day Day number of the Advent of Code puzzle
part 1 or 2. Each AoC puzzle has 2 parts
input A string containing the entire puzzle input

Output

Outputs a JSON serialization of the solutions output, generally a number or a string.

Examples

Running the 2018 Day 1 puzzle:

{
  "day": 1,
  "part": 2,
  "input": "+7, +7, -2, -7, -4"
}

Running Locally

Build it tested on both 1.22.1 and nightly rust, though you will need nightly to run benchmarks.

cargo build
cargo test
cargo test day4

Benchmarks and the aoc binary it use inputs from inputs/day-{num}.txt.

# Run all the benchmarks
cargo bench

# Run benchmarks for a specific day
cargo bench day4

# TODO
cargo build --release
target/release/aoc 4-1
target/release/aoc 4-1 inputs/day-4.txt