Advent of code solutions. Most recently in Rust.
Running tests and solutions is mostly conveniently done within the directory for each solution while editing:
cd 2022/src/bin/aoc-25
# Run tests:
cargo test --bin $(basename $(pwd))
# Run tests and display output in a readable manner:
RUST_BACKTRACE=1 cargo test --bin $(basename $(pwd)) -- --nocapture --test-threads 1
# Run solution:
cargo run --release --bin $(basename $(pwd)) input.txt
- Install
uv
- Navigate to daily directory
- Run with
./main.py input_file
Generally these can be compiled and run as follows:
cd 2018/10
# Compile:
clang++ --std=c++14 -g main.cpp
# Run:
cat input.txt | ./a.out