- Each solution uses the most efficient algorithms to the best of my knowledge.
- Self contained depending only on the
stdRust library. No use ofunsafefeatures. - Consistently formatted with
rustfmtand linted byclippy. - Thoroughly commented with
rustdocgenerated documentation online. - Test coverage with continuous integration provided by GitHub Actions.
Show details
Input
Place input files in input/yearYYYY/dayDD.txt including leading zeroes. For example:
input/year2015/day23.txtinput/year2023/day02.txt
Run
- Everything
cargo run - Specific year
cargo run year2023 - Specific day
cargo run year2023::day01 - Release profile (faster)
cargo run --release - Optimized for current CPU architecture (fastest)
RUSTFLAGS="-C target-cpu=native" cargo run --release
Test
- Everything
cargo test - Specific year
cargo test year2023 - Specific day
cargo test year2023::day01 - Show STDOUT for debugging
cargo test -- --nocapture
Benchmark
- Everything
cargo bench - Specific year
cargo bench year2023 - Specific day
cargo bench year2023::day01
Document
- Build docs including private items
cargo doc --document-private-items - Build doc then open HTML landing page
cargo doc --document-private-items --open
Miscellaneous
- Code quality lints
cargo clippy - Consistent code formatting
cargo fmt