aoc-toolbox 0.3.0

An helping framework to Advent of Code
Documentation

csv-export

About

Advent of code tools.

Installation

Import the following packages in your crate:

aoc-toolbox = "0.3"
aoc-toolbox-derive = "0.3"

Usage

Main generation

You can mark solvers in your code:

#[aoc("day01", "part1")]
fn solve_day01_part1(input: String) -> String {
    // ...
}

And then at the end of your main.rs, you can call this macro:

aoc_main!(2021);

Limitations

  • For the moment, macros do not have context. Their state is not saved between calls (see this issue). I use a hack to save an internal state, so problems can appear...
  • Each solver must have the following signature:
    fn (input: String) -> String;
    

Motivation

This tool was intended for my purpose only.

I choosed to release it, so anyone can use it. Enjoy!