A rust template for Advent of Code.
export AOC_YEAR=<year>
export AOC_SESSION=<Your session key>
export AOC_INPUT=<Your input directory>
cargo build
build.rs
- you don't need to build again.cargo run -- init <day>
. The file will be downloaded into the AOC_INPUT
directory.src/solutions/dayX.rs
cargo run -- run <day> [--part <part>] [--extra arg1 arg2 arg3] [--input path/to/input]
--part
will run both part 1 and part 2.--extra
will give an empty Vec<T>
of extra args.--input
will look for the download input in AOC_INPUT
.build.rs
is very brittle and made only for the initial state of the repo.Cargo.toml
is me. Change it if you want.Do not run build.rs
after you have started writing your code.