My attempts at the Advent of Code 2022 challenges in Rust.
This is primarily a learning experience, and the code may not be following best practices.
Day | Name | Code | Input Data | Time † | GitHub Action Output |
---|---|---|---|---|---|
1 | Calorie Counting | src/day_01.rs | src/day_01.data | 0m0.002s |
|
2 | Rock Paper Scissors | src/day_02.rs | src/day_02.data | 0m0.002s |
|
3 | Rucksack Reorganization | src/day_03.rs | src/day_03.data | 0m0.002s |
|
4 | Camp Cleanup | src/day_04.rs | src/day_04.data | 0m0.001s |
|
5 | Supply Stacks | src/day_05.rs | src/day_05.data | 0m0.002s |
|
6 | Tuning Trouble | src/day_06.rs | src/day_06.data | 0m0.002s |
|
7 | No Space Left On Device | src/day_07.rs | src/day_07.data | 0m0.002s |
|
8 | Treetop Tree House | src/day_08.rs | src/day_08.data | 0m0.002s |
|
9 | Rope Bridge | src/day_09.rs | src/day_09.data | 0m0.007s |
|
10 | Cathode-Ray Tube | src/day_10.rs | src/day_10.data | 0m0.003s |
|
11 | Monkey in the Middle | src/day_11.rs | src/day_11.data | 0m0.030s |
|
12 | Hill Climbing Algorithm | src/day_12.rs | src/day_12.data | 0m0.053s |
|
13 | Distress Signal | src/day_13.rs | src/day_13.data | 0m0.053s |
|
14 | Regolith Reservoir | src/day_14.rs | src/day_14.data | 0m0.002s |
|
15 | Beacon Exclusion Zone | src/day_15.rs | src/day_15.data | 0m0.645s |
† The measured execution time in GitHub Actions
All puzzles are compiled into a single executable, and individual puzzles are selected using the first argument, which is the day number (01-25).
For example, to build and execute the puzzle for Day 2, run:
cargo run -- 02
To build optimized artifacts, run:
cargo build –-release --verbose
./target/release/aoc 02
- Hero background image by Anna Peipina on Unsplash.