https://github.com/guillermomuntaner/adventofcode2021
https://github.com/guillermomuntaner/adventofcode2021
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/guillermomuntaner/adventofcode2021
- Owner: guillermomuntaner
- Created: 2021-11-30T22:55:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-12-27T00:37:01.000Z (over 3 years ago)
- Last Synced: 2025-01-29T10:19:03.599Z (4 months ago)
- Language: Rust
- Size: 142 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2021

Giving [Advent of Code 2021 ๐](https://adventofcode.com/2021) a go to with [Rust ๐ฆ](https://www.rust-lang.org/learn/get-started).
## Cargo
[Cargo](https://doc.rust-lang.org/book/ch01-03-hello-cargo.html) is Rustโs build system and package manager.
### Building and Running a Cargo Project
Run `cargo build` to compile the project.
The executable will be created in `target/debug/advent-of-code-2021`.To compile and execute simply run `cargo run`.
### Building for Release
Run `cargo build --release` to compile the project with optimizations.
The executable will be created in `target/release/advent-of-code-2021`.## Continuous integration
The CI uses Github Actions and runs 4 jobs:
1. Verify project compiles: `cargo check`
2. Verify main package test suite passes: `cargo test`
3. Verify code on all packages is formatted: `cargo fmt --all -- --check`
4. Lint all packages and fail also on warnings: `cargo clippy --all-targets --all-features -- -D warnings`## Benchmarking
Rust bench is unstable & seems the community uses [Criterion.rs](https://github.com/bheisler/criterion.rs).
### Benchmarking the release executable
[hyperfine](https://github.com/sharkdp/hyperfine) can be used to benchmark arbitrary command line tool:`hyperfine './target/release/advent-of-code-2021'`