#advent #aoc #solution #runner #organize #run #bddap

bddap-aoc

bddap's rust Advent Of Code solution runner

2 releases

0.1.1 Dec 1, 2023
0.1.0 Dec 1, 2023

#10 in #organize

Download history 14/week @ 2024-02-18 9/week @ 2024-02-25 8/week @ 2024-03-10 50/week @ 2024-03-31 1/week @ 2024-04-07

51 downloads per month

MIT/Apache

17KB
297 lines

Bddap's Advent of Code Runner

Crates.io docs.rs

Organize and run your rust advent of code solutions.

Usage

#[bddap_aoc::register(2015, 1, 1)]
fn runa(_inp: &str) -> String {
    42.to_string()
}

#[bddap_aoc::register(2015, 1, 2)]
fn runb(_inp: &str) -> String {
    "Solution!".to_string()
}

#[bddap_aoc::register(3243, 2, 1)]
fn runc(_inp: &str) -> String {
    "Future solution!".to_string()
}

fn main() {
    bddap_aoc::run_default();
}
cargo run -- login
> Enter session cookie from https://adventofcode.com/ : <cookie>
> Session cookie has been saved.

cargo run -- run
> year 2015 day 1 part 1:
> 42
>
> year 2015 day 1 part 2:
> Solution!
>
> year 3243 day 2 part 1:
> Challenge not yet released.

cargo run -- run --year 2015 --day 1 --part 2
> year 2015 day 1 part 2:
> Solution!

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~6–21MB
~293K SLoC