- 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 first 9 seasons, 450⭐)
The first 9 seasons I originally solved in PHP. This repo contains a partial (~3 seasons) rewrite of these solutions in Rust, plus a simple CLI runner. However, from season 2024 I plan to solve the puzzles first in Rust.
# -- 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 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
# -- 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