No description
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| README.md | ||
| rust-toolchain.toml | ||
My Advent of Code puzzle solutions
How to run
In order to automatically fetch puzzle input from AoC, the AOC_SESSION env variable must be set:
- Go to the AoC website
- Log in to the website with your preffered method of authentication
- View AoC cookies using your browser developer tools or some 3rd party extension
- Copy the value of a
sessioncookie - Create
.cargodirectory, createconfig.tomlinside with the following contents:
# config.toml
[env]
AOC_SESSION = 'YOUR_SESSION_COOKIE'
If this doesn't work, you could get your puzzle inputs manually, create input directiory and add files there. Files must be named YYYY-DD.txt, where YYYY is the year and DD is the day number
Each day's solution is its own binary crate. The command below will fetch a puzzle input, calculate and print the solution:
$ cargo run --release --bin YYYY-DD
You should then see an output like this:
Year YYYY, day DD
Part 1: {part1_answer} ({part1_time})
Part 2: {part2_answer} ({part2_time})