Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drowrin/aoc2023
My Advent of Code 2023 solutions in Rust!
https://github.com/drowrin/aoc2023
advent-of-code advent-of-code-2023 rust
Last synced: about 2 months ago
JSON representation
My Advent of Code 2023 solutions in Rust!
- Host: GitHub
- URL: https://github.com/drowrin/aoc2023
- Owner: Drowrin
- License: mit
- Created: 2023-11-30T18:35:01.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-21T20:17:58.000Z (about 1 year ago)
- Last Synced: 2023-12-22T06:34:32.445Z (about 1 year ago)
- Topics: advent-of-code, advent-of-code-2023, rust
- Language: Rust
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Advent of Code 2023
My solutions in Rust!## Usage
This repo uses [just](https://github.com/casey/just) to run common commands.Since I assume you've got cargo:
```sh
cargo install just
```You can then use the following commands:
```sh
# Initialize a project with a name based on
just new# Same as above, but copies over example data, input data, and your previous solution
# Useful for part two of each day
just new# Run your solution for a day on the example data, and compare to the example answer
just test# Run your solution on your unique input data, and output the answer
just run# Transfer example data, input data, and solution from one day to another
# Useful if you forgot to do `just new `
# Be careful! This will overwrite files in the `to` directory
just transfer
```### Naming Convention
The `just` commands enforce a naming convention for "days". They must all be a 2 digit number from 01-25, followed by a single lowercase letter. This ensures the folders will sort nicely and are easy to work with. The letter at the end is useful for separating a day into two parts, such as "a" and "b".If you want to change this behavior, edit the `validate` recipe in the `justfile`.
### Structure
Once you've made a project with `just new `, you'll need to copy some data from Advent of Code. For all of these, avoid trailing newlines.
- In `data/answer.txt`, put the example answer.
- In `data/example.txt`, put the example input.
- In `data/input.txt`, put your unique input data.
- Write your solution code in `src/solution.rs`.