aoc-star-derive 0.1.1

Macro to flag functions as Advent of Code solutions
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 26.02 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 317.41 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Yag000

aoc-star-derive

Procedural macro crate for aoc-star.

You normally don't use this crate directly. Instead, depend on aoc-star, and import the star attribute from there:

use aoc_star::star;

#[star(day = 1, part = 1, year = 2024)]
fn solve_day1_part1(input: String) -> String {
    // ...
    "answer".to_string()
}

The star attribute:

  • Registers the annotated function as an Advent of Code solution for a given day, part, and optional year.
  • Ensures that the function has the correct signature: it must accept a single String argument (the puzzle input) and return a String (the answer).
  • Uses the inventory crate to make the solution discoverable at runtime.