These are my attempts at solving puzzles from Advent of Code (an annual advent calendar of programming puzzles) using Rust.
Puzzle text and inputs are not included in this repository by request of the Advent of Code FAQ. However, the example inputs and outputs have been copied for use in unit tests.
Puzzle inputs are given similar names to the code that solves them. For
example, the puzzle input for src/advent_of_code_2025/day_03_lobby.rs should
be located at inputs/advent_of_code_2025/day_03_lobby.txt.
The solutions are run from the command line:
cargo run --release -- [YEAR] [DAY]| Argument | Usage |
|---|---|
[YEAR] |
Filter year |
[DAY] |
Filter day |
The solutions can optionally be filtered to a single year, or filtered further to a single day.
| Short | Long | Usage |
|---|---|---|
-h |
--help |
Print help |
Dependencies are mostly avoided for puzzle solutions, but they are sometimes used to avoid "reinventing the wheel":
- clap - Command line argument parsing
- json - JSON parsing in 2015 day 12
- md5 - MD5 hashing in 2015 day 4
Advent of Code was created by Eric Wastl and is a registered trademark in the United States. This repository is not affiliated with Advent of Code or Eric Wastl.
The Rust code in this repository is not released under any specific license. It may be used freely, but I suggest you do not use it to fill in solutions for your own attempts.