···1+set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
2+3+default_day := `date +'%d'`
4+5+default: sync build
6+7+# Run this whenever you change build files. This generates the latest build config.
8+sync:
9+ meson setup --reconfigure build/
10+11+# Build everything Meson knows about.
12+build:
13+ meson compile -C build/
14+15+# Run tests for a specific day. Defaults to today's day-of-month.
16+test day=default_day: sync
17+ day=$(printf '%02d' "{{day}}"); meson test -C build "day${day}"
18+19+# Run a day's solution on the "real" data set.
20+run day=default_day: sync
21+ day=$(printf '%02d' "{{day}}"); meson compile -C build "run-day${day}"
22+23+# Clean the build folder. Useful... sometimes.
24+clean:
25+ meson setup --wipe build/
+22
README.md
···0000000000000000000000
···1+# Advent of Code 2025 (C++)
2+3+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.
4+5+## Workflow
6+7+```sh
8+nix develop # optional if tooling is installed already; brings in clang/meson/just
9+just # runs sync + build
10+just test 5 # run tests for day 05
11+just run # run today's solution on "real" data
12+```
13+14+`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.
15+16+## Layout
17+18+- `src/<day>/solution.cxx` — main for each day (`src/00/solution.cxx` is a stub).
19+- `data/<day>/` — input directory for that day.
20+- `DATA_FOLDER` — compile-time string macro injected by Meson pointing at `data/<day>/`.
21+22+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.