Solutions for Advent of Code 2024 written in Rust 🦀
- Rust (2021 edition or later)
- Cargo (comes with Rust)
git clone https://github.com/barclayd/advent-of-code-2024.git
cd advent-of-code-2024
cargo build
cargo test
Prerequisites:
- Get your AoC Session Cookie
This can be done by copying the value by going to https://adventofcode.com/ and opening Dev Tools.
Chrome: Application
=> Cookies
=> https://adventofcode.com/
=> session: <value>
Copy the value and paste it into a newly created .env
, based on .env.local
brew install pup
./scripts/new-day.sh
- This will generate a new folder with a template ready to be worked on, including test setup and a blank a
test.txt
.
test.txt
requires manual copying and pasting from the puzzle html at present
./scripts/puzzle-input.sh
This command auto generates your input.txt
file and places it in the latest day folder.
For example, if you are working on a solution for Day 4, it will place it in /day-04/input.txt
, ready to be used in your solution.
It is to be run when you have understood the puzzle and your tests locally for test.txt
are passing.
advent-of-code-2024/
├── day-01/
├── day-02/
├── day-03/
...
└── README.md
This project uses GitHub Actions for continuous integration. The workflow:
- Runs on every push to
main
and pull request againstmain
- Tests solution for every day
The workflow configuration can be found in .github/workflows/ci.yml
.
These run in a parallelized matrix.
Day | Challenge | Stars |
---|---|---|
1 | Historian Hysteria | ⭐️⭐️ |
2 | Red-Nosed Reports | ⭐️⭐️ |
3 | Mull It Over | ⭐️⭐️ |
4 | Ceres Search | ⭐️⭐️ |
5 | Print Queue | ⭐️⭐️ |
6 | Guard Gallivant | ⭐️⭐️ |
7 | Bridge Repair | ⭐️⭐️ |
8 | Resonant Collinearity | ⭐⭐ |
9 | Disk Fragmenter | ⭐️⭐️ |
10 | Hoof It | ⭐️⭐ |
11 | Plutonian Pebbles | ⭐️⭐ |
12 | Garden Groups | ⭐️⭐ |
13 | Claw Contraption | ⭐⭐ |
14 | Restroom Redoubt | ⭐⭐ |
15 | Warehouse Woes | ⭐⭐ |
16 | Reindeer Maze | ⭐⭐ |
17 | Chronospatial Computer | ⭐⭐ |
18 | RAM Run | ⭐⭐ |
19 | Linen Layout | ⭐⭐ |
20 | Race Condition | ⭐⭐ |