Solutions for Advent of Code puzzles, written in Rust.
- Clone the repository.
git clone https://github.com/jontmy/aoc-rust
cd aoc-rust- Get your
SESSION_TOKENfrom the session cookie on adventofcode.com and save it in.env.
vim .env # add SESSION_TOKEN=...- Run the solver for a specific puzzle. The solver will automatically download the puzzle input and cache it.
cargo run --release -- -d <day> -y <year>Tip
If Advent of Code is currently ongoing, the -d and -y flags can be omitted. The current system date will be used instead.
- The
-iflag lets you specify a custom file extension for the file which the input will be read from. Useful for example inputs. - For example,
-d 1 -y 2024 -i ex1will read frominput/2024/01.ex1(note the leading zero). - Setting the
-rflag will re-download the input.
| Year | 2024 | 2023 | 2022 | 2021 | 2020 | 2019 | 2018 | 2017 | 2016 | 2015 |
|---|---|---|---|---|---|---|---|---|---|---|
| Progress | 24* |
× |
28* |
41* |
× |
× |
× |
2* |
20* |
38* |
Progress indicated only for solutions in Rust. Solutions in other languages:
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 |
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 |