···11+set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
22+33+default_day := `date +'%d'`
44+55+default: sync build
66+77+# Run this whenever you change build files. This generates the latest build config.
88+sync:
99+ meson setup --reconfigure build/
1010+1111+# Build everything Meson knows about.
1212+build:
1313+ meson compile -C build/
1414+1515+# Run tests for a specific day. Defaults to today's day-of-month.
1616+test day=default_day: sync
1717+ day=$(printf '%02d' "{{day}}"); meson test -C build "day${day}"
1818+1919+# Run a day's solution on the "real" data set.
2020+run day=default_day: sync
2121+ day=$(printf '%02d' "{{day}}"); meson compile -C build "run-day${day}"
2222+2323+# Clean the build folder. Useful... sometimes.
2424+clean:
2525+ meson setup --wipe build/
+22
README.md
···11+# Advent of Code 2025 (C++)
22+33+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.
44+55+## Workflow
66+77+```sh
88+nix develop # optional if tooling is installed already; brings in clang/meson/just
99+just # runs sync + build
1010+just test 5 # run tests for day 05
1111+just run # run today's solution on "real" data
1212+```
1313+1414+`just test`/`run` default to today's day-of-month; pass an explicit day to override. Meson owns the build/run logic; Just only wires day selection and delegates.
1515+1616+## Layout
1717+1818+- `src/<day>/solution.cxx` — main for each day (`src/00/solution.cxx` is a stub).
1919+- `data/<day>/` — input directory for that day.
2020+- `DATA_FOLDER` — compile-time string macro injected by Meson pointing at `data/<day>/`.
2121+2222+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.