Skip to content

Cadiac/adventofcode

Repository files navigation

Tests and Deploy

🎄🎄🎄 Advent of Code 2024 🎄🎄🎄

Solutions to Advent of Code 2024 implemented in Rust.

Online solutions runner: https://aoc.cadi.ac/

Installing

Follow Rust installation instructions.

Running the solutions

The project is split into separate binaries within one cargo project.

You can run individual solutions with

$ cargo run -- --day 1 --year 2024

or using custom inputs with

$ cargo run -- --day 1 --year 2024 --file inputs/2024/day01.txt

All solutions of the current year can be run using defaults inputs from inputs/ directory with

$ cargo run

Single day's tests can be run with

$ cargo test --workspace -- y2024::day01::tests

or all tests with

$ cargo test --workspace

within the project's root directory.

Benchmarking

You can run all benchmarks within aoc-solver directory with

$ cargo bench

Individual day benchmarks can be run using

cargo bench -- day-1 --exact

Running the web project

This repository now also ships with a small web tool, https://aoc.cadi.ac/ to run the solutions online.

To get started with local web development environment start by adding wasm32-unknown-unknown toolchain:

$ rustup target add wasm32-unknown-unknown

Then install trunk

$ cargo install --locked trunk

and within the aoc-web directory start the local development server with

$ trunk serve

This should start the server at localhost:8080.

Solutions

❄️ Day 01 ❄️ Day 02 ❄️ Day 03 ❄️ Day 04 ❄️ Day 05 ❄️ Day 06 ❄️ Day 07 ❄️ Day 08 ❄️ Day 09 ❄️ Day 10 ❄️ Day 11 ❄️ Day 12 ❄️ Day 13 ❄️ Day 14 ❄️ Day 15 ❄️ Day 16 ❄️ Day 17 ❄️ Day 18 ❄️ Day 19 ❄️ Day 20 ❄️ Day 21 ❄️ Day 22 ❄️ Day 23 ❄️ Day 24 ❄️ Day 25

About

Learning Rust with Advent of Code 2023

Topics

Resources

License

Stars

Watchers

Forks

Languages