Advent of Code in Rust 🦀
Complete solutions of Advent of Code in Rust, and sometimes in Python and other languages 🎄✨.
Made for fun 😎 and to practice Rust. Many thanks to Eric Wastl.
Calendar | Solutions | Stars | Rust | Python | 🎁 |
---|---|---|---|---|---|
Advent of Code 2024 | Solutions | 50⭐ | 25 | 10 | 3 |
Advent of Code 2023 | Solutions | 50⭐ | 25 | 11 | 1 |
Advent of Code 2022 | Solutions | 50⭐ | 25 | 18 | 1 |
Advent of Code 2021 | Solutions | 50⭐ | 25 | 12 | |
Advent of Code 2020 | Solutions | 50⭐ | 25 | 23 | |
Advent of Code 2019 | Solutions | 50⭐ | 25 | 23 | 2 |
Advent of Code 2018 | Solutions | 50⭐ | 25 | 4 | 1 |
Advent of Code 2017 | Solutions | 50⭐ | 25 | 17 | |
Advent of Code 2016 | Solutions | 50⭐ | 25 | 0 | |
Advent of Code 2015 | Solutions | 50⭐ | 25 | 5 | 1 |
Year | Count | Days |
---|---|---|
2024 | 3 | 14 15 16 |
2023 | 1 | 10 |
2022 | 1 | 17 |
2019 | 2 | 13 15 |
2018 | 1 | 18 |
2015 | 1 | 18 |
All solutions are tested and verified with a lot of puzzle inputs and answers (personal accounts, family accounts, friends' accounts and those found on GitHub). Thus, they can be considered totally generic.
By choice, I use the most recent versions of the languages, and therefore sometimes new paradigms and functionalities, since AoC is an excellent way to practice, explore and learn (while having fun!).
Rust solutions respect cargo clippy -- -D clippy::all -F clippy::pedantic -F clippy::nursery
, which is a pretty strong hardening (except one clippy::too_many_lines
).
They also include, for the most part, unit tests taken from the examples of puzzle statements.
On average, with all the inputs I have, 80% of them run in less than 100ms on my Apple Silicon M1, and 95% in less than half a second.