AOC Helper is a crate to make solving and sharing aoc problems in rust
easier. It is inspired by cargo-aoc.
cargo-aoc is a binary that will also take care of compilation, while this
crate is a library you can import and use in your code. This aims to make it
easier to share and debug other people's code, and to perhaps be easier to
To get started, add
aoc-helper to the
dependencies section in your
[dependencies] aoc-helper = "0.2.1"
You also need to provide a session ID for
aoc-helper to be able to
download your input files. The session ID is stored in a cookie called
session in your browser on the aoc website if
you're logged in. You can provide the session ID through an
environment variable with the name
AOC_SESSION_ID, through the
session_id functions on
Helper, or by using an
If you're using an
aoc_helper.toml file, you need to specify the
config-file feature and
specify your session ID in
aoc_helper.toml like this:
session-id = "82942d3671962a9f17f8f81723d45b0fcdf8b3b5bf6w3954f02101fa5de1420b6ecd30ed550133f32d6a5c00233076af"
Then, create an instance of
AocDay. Look at its
documentation for information. The output is by default colored. You can
disable this by disabling the default features.