This repository contains my solutions for the Advent of Code (AoC) challenges, implemented in Rust.
The project is organized into several directories:
src/
: Contains the source code.examples/
: Sample inputs for quick tests and examples.inputs/
: Actual input data for each day's challenge.solutions/
: Rust modules with solutions for each day. Add new day's solution asdayXX.rs
.lib.rs
: Library root file.main.rs
: Main executable for running solutions.
To add a solution for a new day, place the challenge input as dayXX.txt
in the inputs
directory and the solution code in solutions/dayXX.rs
.
- Rust programming environment.
- Cargo, Rust's package manager.
- Clone the repository to your local machine.
- Navigate to the project directory.
- To run a solution for a specific day, execute:
Replace
cargo run -- [day_number]
[day_number]
with the day number of the challenge (e.g.,1
for Day 1).
- Testing: Each day's solution includes tests. Run them using:
cargo test
- Benchmarking: Performance benchmarks are available for each solution. Run them using:
cargo bench
Distributed under the GNU GPLv3 License. See LICENSE
for more information.