- AoC website
- My AoC username:
tbali0524
- Puzzle list with topics and my completion status (in Rust)
- Results and running times
- This repo on GitHub
- My AoC solutions in PHP (complete 10 seasons, 500⭐)
This repo contains my AoC solutions in Rust, and a simple CLI runner. The first 9 seasons I originally solved in PHP, and later rewrote some solutions (~3.5 seasons) in Rust. From season 2024 I solved the puzzles first in Rust (and rewrote them in PHP later).
# -- setup # install Rust: https://www.rust-lang.org/tools/install rustup update stable # -- info cargo version cargo tree # -- lint cargo audit cargo check cargo fmt cargo clippy # -- doc cargo doc --no-deps --document-private-items --open # -- test cargo nextest run # needs cargo plugin: <https://nexte.st/> cargo test cargo test 2024 cargo test 2024day01 cargo test cli # in Powershell: $Env:RUST_BACKTRACE=1; cargo test cargo run cargo run -- 2024 cargo run -- 2024 1 # -- run cargo build --release target/release/aoc.exe target/release/aoc.exe 2024 target/release/aoc.exe 2024 1 cargo run --release # -- shortcut run (Windows) ./aoc.bat ./aoc.bat 2024 ./aoc.bat 2024 1 ./aoc.bat --help # -- shortcut qa+run (Windows) ./qa.ps1 # -- profiling (Windows), using [samply](https://github.com/mstange/samply/) cargo build --profile profiling samply record ./target/profiling/aoc.exe # -- cleanup cargo clean
- for puzzle year
YYYY
, dayDD
: - add puzzle input in
input/YYYY/AocYYYYDayDD.txt
and example inputs in...exX.txt
- add and edit source in
src/aocYYYY/aocYYYYdayDD.rs
, using the template insrc/aocYYYYdayDD.rs
- update
pub fn metadata()
, writesolve()
, add unit tests as needed
- update
- edit
src/aocYYYY.rs
:- uncomment the
pub mod aocYYYYdayDD;
line - update the
PUZZLES
list: replaceNone
withSome(...)
- uncomment the
- for a completely new season:
- edit
src/lib.rs
: add apub mod aocYYYY;
line - edit
src/aoc.rs
: increaseMAX_SEASONS
and add aSome(...)
item toPUZZLES
- add and update
src/aocYYYY.rs
using the template insrc/aocYYYY.rs
- edit