This repository contains my solutions for the Advent of Code challenges, written in Rust.
Besides having the nightly channel of the Rust toolchain installed, you will need the following tools:
just- A handy command runner for project-specific taskscargo-generate- A utility to quickly scaffold boilerplate codeaoc-cli- A CLI tool to interact with the Advent of Code website
Tip
To use this repository as a template for your own solutions, simply delete the sub-directories in the src/ directory that match the y{year} pattern and remove the modules from the lib.rs file.
You may then run the just scaffold <year> and just scaffold <year> <day> commands to scaffold the boilerplate code for the event and puzzles of a specific year.
Follow the instructions provided in the aoc-cli repository to authenticate with the Advent of Code website using a session cookie.
justAvailable recipes:
bench year="" day="" part="" # π Measure the performance of the solutions
debug year="" day="" format="" # π Run the solutions with diagnostic messages
default
format # π Format the codebase
lint *FLAGS # π§Ή Lint the codebase
scaffold year day="" # ποΈ Scaffold boilerplate for a new year or day's puzzle
solve year="" day="" format="" # π§© Execute the solutions and obtain answers in a formatted output
submit year day part # π€ Send the answer for one part of a specific day's puzzle
test year="" day="" # π§ͺ Check if the solutions pass the base examples
| Year | Benchmark (ms) |
|---|---|
| 2015 | - |
| 2016 | - |
| 2017 | - |
| 2018 | - |
| 2019 | - |
| 2020 | - |
| 2021 | - |
| 2022 | - |
| 2023 | - |
| 2024 | - |
| 2025 | - |
-
Advent of Code - The fantastic website that hosts the challenges for free every year.
-
aoc-cli- An awesome CLI tool to interact with the Advent of Code website. -
maneatingape/advent-of-code-rust- An excellent set of solutions to the Advent of Code challenges in Rust.The project structure and patterns used in this repository are heavily inspired by this project. I've also borrowed some of the utilities from there.
-
evenfurther/aoc- A neat crate that simplifies the creation of boilerplate code for these challenges.I initially opted for this crate and generated multiple crates for each year, but I disliked having to use a workspace, which is why I refactored away from it. This project introduced me to build scripts.
-
awesome-advent-of-code- A curated list of awesome resources related to the Advent of Code, without which I wouldn't have found the tools mentioned above.