This repository contains my solutions to the Advent of Code 2022 puzzles. I'm using this as an opportunity to learn & practise Rust, so the solutions are not necessarily the most efficient or idiomatic.
To run a solution, use the following command:
cargo run --release --bin dayXX-Y
where XX
is the day number and Y
is the part number.
For example, to run the solution for day 1 part 2, use the following command:
cargo run --release --bin day01-2
You can configure the log level by setting the RUST_LOG
environment variable. For example, to run the solution for day 1 part 2 with debug logging, use the following command:
RUST_LOG=debug cargo run --release --bin day01-2
For code coverage, I'm using cargo-llvm-cov.
To install cargo-llvm-cov
, run the following command:
cargo +stable install cargo-llvm-cov
To generate a coverage report and open it in the default browser, use the following command:
cargo llvm-cov --open
This project is licensed under the MIT License - see the LICENSE file for details.