Skip to content

Solutions for Advent of Code puzzles, written in Rust

Notifications You must be signed in to change notification settings

jontmy/aoc-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code

Solutions for Advent of Code puzzles, written in Rust.

Getting Started

  1. Clone the repository.
git clone https://github.com/jontmy/aoc-rust
cd aoc-rust
  1. Get your SESSION_TOKEN from the session cookie on adventofcode.com and save it in .env.
vim .env  # add SESSION_TOKEN=...
  1. Run the solver for a specific puzzle. The solver will automatically download the puzzle input and cache it.
cargo run --release -- -d <day> -y <year>

Tip

If Advent of Code is currently ongoing, the -d and -y flags can be omitted. The current system date will be used instead.

Other tips

  • The -i flag lets you specify a custom file extension for the file which the input will be read from. Useful for example inputs.
  • For example, -d 1 -y 2024 -i ex1 will read from input/2024/01.ex1 (note the leading zero).
  • Setting the -r flag will re-download the input.

Progress

Year 2024 2023 2022 2021 2020 2019 2018 2017 2016 2015
Progress 24* × 28* 41* × × × 2* 20* 38*

Progress indicated only for solutions in Rust. Solutions in other languages:

2024

S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25

2022

S M T W T F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25

2021

S M T W T F S
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25

2016

S M T W T F S
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25

2015

S M T W T F S
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25

About

Solutions for Advent of Code puzzles, written in Rust

Topics

Resources

Stars

Watchers

Forks

Languages