Skip to content

Repository for keeping my Advent of Code solutions in Rust

License

Notifications You must be signed in to change notification settings

LHelge/AdventOfCode

Repository files navigation

AdventOfCode

Repository for keeping my Advent of Code solutions in Rust

Year:

Usage

The projects is defined as a cargo workspace with a subcrate for each year. Each day is defined as a separate binary. To run the code you need to have cargo and Rust installed.

Tests

There is a test defined for each of the daily examples, those can be run with cargo test either for a specific year or for the whole workspace

Run

To calculate the answer for a given day run the binary with the following commmand (to run the 2023 day 3 solution):

cargo run --bin y23d03

Your problem input will be fetched automatically and since your input is unique, you need to set a valid session token as an environment variable

export SESSION=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

or as a .env file containing:

SESSION=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The session token can be found by inspecting the cookies using your browsers developer tools.

About

Repository for keeping my Advent of Code solutions in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages