aoc-toolkit 0.1.0-alpha.1

A toolkit for solving Advent of Code problems
Documentation

AOC Toolkit

CI License: MIT

A developer toolkit for Advent of Code, built in Rust and designed to support multiple solution languages through a unified CLI.

Early alpha: Rust is the only implemented adapter. The current version provides project discovery, execution of registered Rust solutions and a local input cache. Project initialization, day scaffolding, interactive authentication, progress tracking, benchmarking and a TUI are planned, not available commands yet.

Installation

Once v0.1.0-alpha.1 is published, install it with Cargo:

cargo install aoc-toolkit --version 0.1.0-alpha.1 --locked

Alternatively, obtain a prebuilt executable from GitHub Releases. The release pipeline targets Linux and macOS (x86_64 and ARM64), and Windows (x86_64). Running Rust solutions requires a compatible Rust toolchain and Cargo even when the global CLI is installed from a prebuilt binary.

aoc --help
aoc --version

Using an existing Rust project

The global CLI searches the current directory and its ancestors for an aoc.toml file. Configure a Rust project that exposes a local runner binary.

Example for a single-package project:

schema_version = 1

[project]
language = "rust"
solutions = "src"

[runner]
manifest = "Cargo.toml"
profile = "release"

Set runner.binary if Cargo needs an explicit binary target. Paths are relative to the project root. For a workspace, point runner.manifest to the solution package's manifest.

In the solution package, use the same toolkit version with the runner feature:

[dependencies.aoc-toolkit]
version = "=0.1.0-alpha.1"
default-features = false
features = ["runner"]

Implement the aoc_toolkit::core::Day trait for each solver, register your solvers in a static Registry, and pass that registry to aoc_toolkit::runner::run from your local binary. The global CLI delegates execution to that binary through Cargo. The project generator will simplify this setup in a future release.

Run solutions

aoc run                         # Latest registered solution
aoc run --year 2023             # Latest registered day in 2023
aoc run --year 2023 --day 1      # Both parts of a specific day
aoc run --year 2023 --day 1 --part 2
aoc run --year 2023 --all        # All registered days in a year
aoc run --all                   # All registered solutions

Puzzle inputs

The local runner reads cached input from inputs/<year>/<day>.txt relative to the project root when invoked through the global CLI. If the cache is missing, the current client attempts to fetch input using the user's own SESSION_ID environment variable.

Automatic login and secure credential storage are not implemented yet. Keep inputs and credentials private, exclude them from version control, and respect Advent of Code's service rules. Prefer existing cached input to repeated requests.

Cargo features

Feature Purpose
No default features Minimal Rust solver contracts and registry
client HTTP and input caching infrastructure
runner Local Rust solution runner (includes client)
cli (default) Global aoc executable, project configuration and adapters

Development roadmap

  • Rust solver contracts and registry
  • Local Rust runner and global CLI delegation
  • Cross-platform build and test matrix
  • Project initialization and day scaffolding
  • Secure desktop authentication and improved input caching
  • Progress tracking and benchmarking
  • Interactive terminal UI
  • Additional language adapters

Contributing

See CONTRIBUTING.md, architecture and language support. Release history is available in GitHub Releases.

This is an independent community project, not affiliated with Advent of Code.

License

MIT.