Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dariodip/advent-of-code
Solutions for the Advent of Code challenge using Rust
https://github.com/dariodip/advent-of-code
advent-of-code challenge rust
Last synced: 1 day ago
JSON representation
Solutions for the Advent of Code challenge using Rust
- Host: GitHub
- URL: https://github.com/dariodip/advent-of-code
- Owner: dariodip
- License: gpl-3.0
- Created: 2021-12-03T17:04:24.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T16:44:52.000Z (about 2 months ago)
- Last Synced: 2024-12-03T17:48:09.818Z (about 2 months ago)
- Topics: advent-of-code, challenge, rust
- Language: Rust
- Homepage:
- Size: 116 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code solutions
[![Pipeline](https://github.com/dariodip/advent-of-code-2021/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/dariodip/advent-of-code-2021/actions/workflows/rust.yml)
Solutions to [Advent of Code](https://adventofcode.com/) problems 2021 in Rust.
This repository holds a single Rust project that contains all the days.
## Run the solutions
The command line tool takes ` ` as arguments and reads the problem input from `stdin`.
To run the solution for the first part of day `1` you can run:
```sh
$ cat src/year2021/day01_input.txt | cargo run -q 1 2
```## Add new solutions
To add a new solution (*day*), you need to:
- Create a file `day01.rs` under `src/year2021`;
- Add a function `pub fn solve(input: &mut Input) -> Result` under that file;
- Export the function in `src/year2021/mod.rs`;## Git hooks configuration
Execute this command to setup git hooks:
```
git config --local core.hooksPath ./hooks
```
# advent-of-code-ex