No description
Find a file
erius 0ce4c8d960
All checks were successful
/ test (push) Successful in 2s
Implemented 2025-03 part 1 solution.
Added tests for each puzzle with example inputs from aoc website.
Added cargo test command to forgejo workflow.
2025-12-11 07:59:29 +03:00
.forgejo/workflows Implemented 2025-03 part 1 solution. 2025-12-11 07:59:29 +03:00
src Implemented 2025-03 part 1 solution. 2025-12-11 07:59:29 +03:00
.gitignore Modified .gitignore to excldue .cargo dir - it is now repos users 2025-12-02 17:53:17 +03:00
Cargo.lock Renamed package from oc2024 to oc. 2025-12-02 17:11:54 +03:00
Cargo.toml Renamed package from oc2024 to oc. 2025-12-02 17:11:54 +03:00
README.md Renamed rust bin files according to a new naming scheme YYYY-DD.rs to allow for different years solutions. 2025-12-02 05:54:56 +03:00
rust-toolchain.toml Added rust-toolchain.toml - using latest stable release 2024-12-18 10:08:13 +03:00

My Advent of Code puzzle solutions

How to run

In order to automatically fetch puzzle input from AoC, the AOC_SESSION env variable must be set:

  1. Go to the AoC website
  2. Log in to the website with your preffered method of authentication
  3. View AoC cookies using your browser developer tools or some 3rd party extension
  4. Copy the value of a session cookie
  5. Create .cargo directory, create config.toml inside with the following contents:
# config.toml
[env]
AOC_SESSION = 'YOUR_SESSION_COOKIE'

If this doesn't work, you could get your puzzle inputs manually, create input directiory and add files there. Files must be named YYYY-DD.txt, where YYYY is the year and DD is the day number

Each day's solution is its own binary crate. The command below will fetch a puzzle input, calculate and print the solution:

$ cargo run --release --bin YYYY-DD

You should then see an output like this:

Year YYYY, day DD
Part 1: {part1_answer} ({part1_time})
Part 2: {part2_answer} ({part2_time})