1
0
Fork 0
Advent of Code for 2023! (written in Rust)
Go to file
lwad 86237b52f5 chore: Update README 2023-12-15 14:18:11 +00:00
.assets
.cargo
data feat: Add d10 data 2023-12-10 14:33:30 +00:00
src feat: Solve d10t1 2023-12-10 15:22:52 +00:00
.gitignore
Cargo.lock
Cargo.toml
README.md chore: Update README 2023-12-15 14:18:11 +00:00

README.md

🎄 Advent of Code 2023!

Solutions for Advent of Code in Rust.


Run solutions for a day

# example: `cargo solve 01`
cargo solve <day>

# output:
#     Finished dev [unoptimized + debuginfo] target(s) in 0.13s
#     Running `target/debug/01`
# Part 1: 42 (166.0ns)
# Part 2: 42 (41.0ns)

The solve command runs your solution against real puzzle inputs. To run an optimized build of your code, append the --release flag as with any other rust program.

By default, solve executes your code once and shows the execution time. If you append the --time flag to the command, the runner will run your code between 10 and 10.000 times (depending on execution time of first execution) and print the average execution time.

For example, running a benchmarked, optimized execution of day 1 would look like cargo solve 1 --release --time. Displayed timings show the raw execution time of your solution without overhead like file reads.

Run all tests

cargo test

To run tests for a specific day, append --bin <day>, e.g. cargo test --bin 01. You can further scope it down to a specific part, e.g. cargo test --bin 01 part_one.