Advent of Code solutions
Solutions to Advent of Code problems in Rust.
Running locally
The command line tool takes <year> <day> <part>
as arguments and reads the problem input from stdin:
|
Published crate
This crate is published to crates.io/crates/advent-of-code.
As a library it exposes a solve(year, day, part, input)
function as documented on docs.rs/advent-of-code:
// Using the dependency added: advent-of-code = "*":
use solve;
It also contains the command line program to run the solution:
|
Docker image on Docker Hub
The command line interface is published to a fredrikfornwall/advent-of-code Docker image:
|
Generating flamegraphs on macOS
Install flamegraph with cargo install flamegraph
and build a benchmark binary with:
RUSTFLAGS='-g'
This will create a benchmark binary under something like ls ../../target/release/deps/benchmark-31ba773f80f7f5d8
. Then profile and generate a flamegraph.svg
by running