Fork of github.com/TomPlanche/aoc_2025
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-12-12 10:05:29 +01:00
day01 [3] (feat on main) D1-P2 2025-12-01 14:47:19 +01:00
day02 [11] (chore on main) Cleaner code 2025-12-03 00:18:20 +01:00
day03 [14] (feat on main) D3 part 2 + clippy 2025-12-03 09:54:02 +01:00
day04 [16] (feat on main) D4 all + utils update 2025-12-04 09:52:19 +01:00
day05 [20] (feat on main) D6 P1 2025-12-07 12:54:20 +01:00
day06 [21] (feat on main) D6 P2 2025-12-07 12:54:37 +01:00
day07 [24] (feat on main) D7 P2 2025-12-07 13:46:46 +01:00
day08 [30] (feat on main) D8 P2 2025-12-09 09:23:36 +01:00
day09 [34] (feat on main) D9 P2 opti w/ rayon 2025-12-09 11:46:17 +01:00
day10 [37] (feat on main) D10 P2 2025-12-10 11:26:22 +01:00
day11 [40] (feat on main) D11 P2 2025-12-11 14:03:01 +01:00
day12 [42] (feat on main) D12 P1 2025-12-12 10:05:29 +01:00
utils [29] (chore on main) Update utils 2025-12-08 11:03:17 +01:00
.gitignore [1] (feat on main) Initial commit 2025-12-01 14:41:59 +01:00
analytics.md [8] (feat on main) D2 opti part 1 2025-12-02 12:57:57 +01:00
Cargo.lock [42] (feat on main) D12 P1 2025-12-12 10:05:29 +01:00
Cargo.toml [1] (feat on main) Initial commit 2025-12-01 14:41:59 +01:00
README.md [4] (feat on main) Cleaner README + analytics 2025-12-01 21:45:19 +01:00

Advent of Code 2025

Solutions for Advent of Code 2025 written in Rust.

Project Structure

This is a Cargo workspace containing:

  • utils/ - Shared utilities for all days (Direction, Point, Solution trait)
  • dayXX/ - Individual day solutions

Running Solutions

Run a specific day

cd day01
cargo run

Run all days

# From workspace root
for day in day*/; do
    echo "Running $day"
    (cd "$day" && cargo run)
done

Testing

Test a specific day

cd day01
cargo test

Test all days

cargo test --workspace

Utilities

The utils crate provides common functionality:

Solution Trait

Standardized structure for daily solutions:

use utils::{run_solution, Solution};

struct Day01;

impl Solution for Day01 {
    type Input = Vec<i32>;
    type Output = i32;

    fn parse_input(&self, input: &str) -> Self::Input {
        // Parse logic here
    }

    fn part1(&self, data: &Self::Input) -> Self::Output {
        // Part 1 solution
    }

    fn part2(&self, data: &Self::Input) -> Self::Output {
        // Part 2 solution
    }
}

fn main() {
    run_solution!(Day01);
}

Direction Enum

8-directional movement with (x, y) coordinates:

use utils::Direction;

let pos = (0, 0);
let new_pos = pos + Direction::Right;  // (1, 0)

Point Type

Generic point implementation:

use utils::Point;

let p1 = Point::new(10, 20);
let p2 = Point::new(15, 25);
let distance = p1.manhattan_distance(&p2);

Adding New Days

This project uses aoc-cli-v2, a custom CLI tool for managing Advent of Code solutions.

Installation

cargo install --git https://github.com/TomPlanche/aoc-cli-v2

Usage

# Add a new day solution template
aoc-cli add <day>

# Download input for a specific day
aoc-cli download <day>

# Submit an answer
aoc-cli submit <day> <part> <answer>

The tool automatically:

  • Creates the day folder structure
  • Sets up the solution template with the Solution trait
  • Downloads your personalized input from adventofcode.com
  • Submits answers directly from the command line

Progress

  • Day 1
  • Day 2
  • Day 3
  • Day 4
  • Day 5
  • Day 6
  • Day 7
  • Day 8
  • Day 9
  • Day 10
  • Day 11
  • Day 12
  • Day 13
  • Day 14
  • Day 15
  • Day 16
  • Day 17
  • Day 18
  • Day 19
  • Day 20
  • Day 21
  • Day 22
  • Day 23
  • Day 24
  • Day 25

Notes

[Add any general notes, patterns, or observations across the challenges]