Advent Of Code 2018 solutions 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.
day_01
day_02
day_03
day_04
day_05
.gitignore
README.md
setup.sh

README.md

Advent Of Code 2018

These are my solutions to the AOC 2018 challenges. All solutions are written in Rust in an attempt to learn the language.

Setup

Run setup.sh from the root of this repository to create a new Cargo project for a day.

Prerequisites

setup.sh assumes that a file named session.txt exists in the same directory. The file should contain the session cookie used by the AOC website. You can find this by examining the GET request executed when requesting a day's input from the AOC website.

Example

$ . ./setup.sh 1

This will create a new Cargo project called day_01, and place the input for the day in a file called input.txt in the day_01 directory. Additionally, it will create a blank (.gitignored) file called sample_input.txt, that I typically use for testing the examples from the problem itself.

It will also subsequently open the newly-created project directory in VS Code.

Running

In order to run the solution for a given day, cd into the directory for the day and cargo run, passing it the folder's input.txt.

Example

$ cd day_01/
$ cargo run --release < input.txt