Skip to content

About

πŸŽ„ Solutions for the Advent of Code challenges, written in Rust.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

Β 

History

86 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Advent of Code πŸŽ„

This repository contains my solutions for the Advent of Code challenges, written in Rust.

Setup

Besides having the nightly channel of the Rust toolchain installed, you will need the following tools:

  • just - A handy command runner for project-specific tasks
  • cargo-generate - A utility to quickly scaffold boilerplate code
  • aoc-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.

Authentication

Follow the instructions provided in the aoc-cli repository to authenticate with the Advent of Code website using a session cookie.

Usage

just
Available 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

Solutions

Year Benchmark (ms)
2015 -
2016 -
2017 -
2018 -
2019 -
2020 -
2021 -
2022 -
2023 -
2024 -
2025 -

Credits

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

About

πŸŽ„ Solutions for the Advent of Code challenges, written in Rust.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages