Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/overminddl1/advent_of_code
https://github.com/overminddl1/advent_of_code
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/overminddl1/advent_of_code
- Owner: OvermindDL1
- Created: 2021-11-30T22:47:04.000Z (about 3 years ago)
- Default Branch: trunk
- Last Pushed: 2023-12-14T22:57:26.000Z (about 1 year ago)
- Last Synced: 2024-10-13T20:09:23.203Z (2 months ago)
- Language: Rust
- Size: 480 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent Of Code
A simple framework to include in all Advent of Code solutions in a single
framework to make it easy to call it with the appropriate CLI arguments.## Installation
Have a proper full Rust installation (see [rustup.rs](https://rustup.rs/) for more).
Clone this repository such as via:```zsh
git clone https://github.com/OvermindDL1/advent_of_code.git
cd advent_of_code
```Then build it by:
```zsh
cargo build --release
```## Usage
If following the above instructions then the final program will be at:
```zsh
./target/release/advent_of_code
```And as such it will be used as the executable path, feel free to move
it elsewhere.See the help with the `--help` flag or the `help` command such as:
```zsh
./target/release/advent_of_code --help
```The `--help` flag and `help` command works on other commands as well,
such as seeing the help for one of the years by:```zsh
./target/release/advent_of_code 2020 --help
```To run, for example, the Advent of Code 2020 Day 1 then run:
```zsh
./target/release/advent_of_code 2020 1 ./inputs/2020/day1.input
```Or use your own input to get your own answer (please try to answer
Advent Of Code on your own, don't just copy and paste answers from
elsewhere).You can see what arguments are needed for a task by showing its
`--help` like such:```zsh
./target/release/advent_of_code 2020 1 --help
```To see the running time of the command then add the `-v` for verbose
as the first argument, such as with:```zsh
./target/release/advent_of_code -v 2020 1 ./inputs/2020/day1.input
```Feel free to add more `v`'s such as `-vvv` for more detailed logging,
but just one will print the times for the runs.## Hints
### Heredoc
If you want test the example of your problem then you can send it
in via a heredoc if using a good modern shell, such as via:```zsh
cargo run --release -- 2020 1 <(cat <