Advent of Code 2025, done in C++

Advent of Code 2025 (C++)#

A Meson + Just playground tailored for day-by-day AoC work. Each day is its own executable that knows where to find its data without manual path plumbing.

Workflow#

nix develop     # optional if tooling is installed already; brings in clang/meson/just
just            # runs sync + build
just test 5     # run tests for day 05
just run        # run today's solution on "real" data (release build)

just test/run default to today's day-of-month; pass an explicit day to override. just run uses a separate Meson release build dir (build-release); tests use the debug dir (build). Meson owns the build/run logic; Just only wires day selection and delegates.

Layout#

  • src/<day>/solution.cxx — main for each day (src/00/solution.cxx is a stub).
  • data/<day>/ — input directory for that day.
  • DATA_FOLDER — compile-time string macro injected by Meson pointing at data/<day>/.

Add new days by creating a src/<day>/solution.cxx (use two-digit day numbers) and a matching data/<day>/ folder. Re-run just sync after adding new days so Meson picks them up.