Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 2.16 KB

README.md

File metadata and controls

56 lines (43 loc) · 2.16 KB

Advent of Code checks-badge docs-badge

Features

  • Each solution uses the most efficient algorithms to the best of my knowledge.
  • Self contained depending only on the std Rust library. No use of unsafe features.
  • Consistently formatted with rustfmt and linted by clippy.
  • Thoroughly commented with rustdoc generated documentation online.
  • Test coverage with continuous integration provided by GitHub Actions.

Quickstart

Show details

Input

Place input files in input/yearYYYY/dayDD.txt including leading zeroes. For example:

  • input/year2015/day23.txt
  • input/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