Skip to content

barclayd/advent-of-code-2024

Repository files navigation

Advent of Code 2024

ci: passing   Rust

Solutions for Advent of Code 2024 written in Rust 🦀

Prerequisites

  • Rust (2021 edition or later)
  • Cargo (comes with Rust)

Getting Started

git clone https://github.com/barclayd/advent-of-code-2024.git
cd advent-of-code-2024
cargo build
cargo test

Scripts

Start a new day

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

Get input

./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.

Project Structure

advent-of-code-2024/
├── day-01/
├── day-02/
├── day-03/
...
└── README.md

Continuous Integration

This project uses GitHub Actions for continuous integration. The workflow:

  • Runs on every push to mainand pull request against main
  • Tests solution for every day

The workflow configuration can be found in .github/workflows/ci.yml. These run in a parallelized matrix.

Progress (40/50 ⭐️)

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 ⭐⭐

About

Advent of Code 2024, written in Rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published