Solutions of Advent-of-Code 2023 in Rust

Overview

Advent of Code 2023 in Rust

If you've never heard of Advent of Code, you're missing out. Check it out now at adventofcode.com!

I mostly do AoC puzzles for fun, generally coding in Python, but I've also found that it's a great way to get some experience with other programming languages, such as Julia or Rust.

This repository contains all my solutions to the AoC 2023 puzzles using Rust.

As I'm still learning Rust, the code may not always be as simple or idiomatic as it could be. If you have suggestions for things I could improve, please don't hesitate to file an issue or submit a PR. Thanks!

Usage

Make sure you have Rust and Git installed, then open a terminal and run:

git clone https://github.com/ageron/aoc2023-rust
cd aoc2023-rust
cargo run --release

You can specify days to run if you want, for example this will run days 2, 4, and 6:

cargo run --release 2 4 6

Getting the data

I've also included a little get_data.py utility to automatically download the data of the day, at the right time (you'll get a countdown if you're early). I was too lazy to code it in Rust, but perhaps I'll port it one day. To use it, just type the following command in a terminal, replacing {day} with the day you want:

cd /path/to/this/repository
python get_data.py 2023 {day}

The script requires the requests and pytz libraries, which you can install like this:

python -m pip install --user requests pytz

The first time you run get_data.py, you will be asked to login to AoC in your browser, find your session cookie, and save it into a .session file in the current directory.

Have fun!

You might also like...
My solutions for Advent of Code 2021, in Rust

Advent of Code 2021 These are my solutions. I have decided to use Rust for now. I'm new to Rust, so it might be some of the worst Rust code you've see

My solutions for the 2021 edition of the Advent of Code, using Rust and SOM (Simple Object Machine)

Advent of Code 2021 These are my solutions for the 2021 edition of the Advent of Code. The solutions are all implemented using both Rust and SOM (Simp

Solutions to Advent of Code 2021, coded in rust

Advent of Code 2021 (aoc-2021-rust) Solutions to Advent of Code 2021 (https://adventofcode.com/2021), coded as part of my efforts to learn Rust Run co

Advent of Code 2022 Solutions (in Rust)

Advent of Code 2022 My solutions for Advent of Code 2022, written in Rust. This repository provides a good template for anyone interested in writing t

My solutions for Advent of Code 2022, written in Rust

Template largely copied from RikvanToor/aoc-rust-template, upgraded for clap v4. This template can be forked/cloned from beeb/aoc-rust. Usage First, f

  🦀 Rust solutions for Advent of Code 2022
🦀 Rust solutions for Advent of Code 2022

🎄 Advent of Code 2022 Solutions for Advent of Code in Rust. 2022 Results Day Part 1 Part 2 Day 1 ⭐ ⭐ Day 2 ⭐ ⭐ Day 3 ⭐ ⭐ Day 4 ⭐ ⭐ Day 5 ⭐ ⭐ Day 6 ⭐

Solutions to Advent of Code 2022 in Rust  🦀

AdventOfCode2022 🎄 Solutions to AoC 2022 in Rust 🦀 Usage cargo run --release --bin DAY # run a specific day cargo run --release # run all

🎄 My Advent of Code solutions in Rust. http://adventofcode.com/2022

Advent of Code 2022 in Rust My Advent of Code 2022 solutions in the Rust programming language. This repository holds a separate Rust project for each

My Advent of Code 2022 solutions, in Rust.

AoC 2022 My solutions for the 2022 edition of Advent of Code in Rust. Simply run cargo run --release --bin dayXX to solve. Some days require z3, insta

Owner
Aurélien Geron
Author of the book Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow. Former PM of YouTube video classification and founder & CTO of Wifirst.
Aurélien Geron
Solutions to Advent of Code 2023 in Rust! :crab:

AdventOfCode2023 ?? Solutions to AoC 2023 in Rust ?? Usage # to be able to download inputs (see fetch.sh) export AOC_SESSION=[value from session cooki

Axel Lindeberg 27 Dec 17, 2023
My Advent of Code 2023 solutions in the Rust programming language.

Advent of Code 2023 in Rust My Advent of Code 2023 solutions in the Rust programming language. This repository holds a separate Rust project for each

Tim Visée 65 Dec 17, 2023
🎄Solutions for Advent of Code 2023

?? Advent of Code 2023 Solutions for Advent of Code in Rust. 2023 Results Day Part 1 Part 2 Day 1 ⭐ ⭐ Day 2 ⭐ ⭐ Day 3 ⭐ ⭐ Day 4 ⭐ ⭐ Day 5 ⭐ ⭐ Day 6 ⭐

Felix Spöttel 3 Dec 4, 2023
My solutions for the Advent of Code 2023.

?? Advent Of Code 2023 Hi! These are my Rust solutions for the Advent of Code 2023. Day Name Source Part 1 Part 2 Time 1 Time 2 1 Trebuchet?! 01.rs ⭐

Marcus Cemes 3 Dec 7, 2023
🎄🎅 My Advent of Code 2023 solutions 🎁⛄

???? My AOC 2023 solutions ??⛄ ?? Table of contents ?? Table of the days ?? Goals ⛄ Quickstart ?? Table of the days Day Part 1 Part 2 Language 01 Toki

rei 6 Dec 11, 2023
Advent of Code 2023 solutions - #15 on global leaderboard

My solutions for Advent of Code 2023, written in Rust. The code requires Rust nightly to run. Sample inputs from each day are provided. To run with ac

Daniel Huang 28 Dec 17, 2023
Advent of Code 2021 puzzles & solutions in Rust

Advent of Code 2021 These are puzzles for the Advent of Code 2021 challenge, written and solved in the Rust programming language. The puzzle for each

Chevy Ray Johnston 8 Dec 19, 2021
My solutions to Advent of Code 2021 (mostly in rust)

Advent of Code 2021 Small code to solve problems at https://adventofcode.com/2021. Most of the code are written in Rust. How to run solutions For exam

“Plane” Abhabongse  Janthong 3 Apr 22, 2022
🎄My Advent of Code 2021 solutions in the Rust programming language

Advent of Code 2021 in Rust My Advent of Code 2021 solutions in the Rust programming language. This repository holds a separate Rust project for each

Tim Visée 227 Dec 16, 2022
My solutions for the Advent of Code 2021 in Scala, Python, Haskell and Rust.

Advent of Code 2021 These are my Advent of Code 2021 solutions written in Scala 3, Haskell, Python and Rust. Day Title L1 L2 L3 L4 01 Sonar Sweep Scal

Axel Suárez 2 Oct 14, 2022