Giter VIP home page Giter VIP logo

yaah's Introduction

Yet Another AOC Helper

crates.io

Getting started

  • Extract the advent of code's session cookie from your browser.
  • Create a new project using the template: cargo generate --git https://github.com/ithinuel/yaah-template.git.
  • Run cargo run --release.
  • Enjoy!

AOC Session

The template stores your session in .cargo/config.toml. Alternatively you can define the environment variable AOC_SESSION.

yaah will automatically download the input file and store it in input/{year}/{day}.txt if it is not present.

yaah's People

Contributors

ithinuel avatar

Watchers

 avatar

Forkers

phord

yaah's Issues

Build fails if benchmarks disabled

When I generate code with benchmarks disabled, I get errors from some of the macros.

cargo generate --git https://github.com/ithinuel/yaah-template.git
🤷   Project Name: aoc2021
🔧   Destination: /home/phord/git/mine/aoc2021 ...
🔧   project-name: aoc2021 ...
🔧   Generating template ...
🤷   What is your AOC session secret?: hunter2-lol
🤷   Which year is it? [default: 2022]: 2021
✔ 🤷   Want to enable benchmarks? · false
[ 1/10]   Done: .cargo/config.toml
[ 2/10]   Done: .cargo
[ 3/10]   Done: .gitignore
[ 4/10]   Done: Cargo.toml
[ 5/10]   Done: LICENSE-APACHE
[ 6/10]   Done: LICENSE-MIT
[ 7/10]   Done: README.md
[ 8/10]   Done: src/lib.rs
[ 9/10]   Done: src/main.rs
[10/10]   Done: src
🔧   Moving generated files into: `/home/phord/git/mine/aoc2021`...
💡   Initializing a fresh Git repository
✨   Done! New project created /home/phord/git/mine/aoc2021
git/mine(main)» cd aoc2021
git/mine/aoc2021(main)» cargo run
  Updating crates.io index
  Compiling autocfg v1.1.0
    :
  Compiling reqwest v0.11.13
  Compiling yaah v0.2.1
  Compiling aoc2021 v0.1.0 (/home/phord/git/mine/aoc2021)
error[E0433]: failed to resolve: use of undeclared crate or module `criterion`
--> src/main.rs:1:1
  |
1 | yaah::aoc_main! { aoc2021 }
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `criterion`
  |
  = note: this error originates in the macro `yaah::aoc_main` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0425]: cannot find value `BENCHES` in crate `aoc2021`
--> src/main.rs:1:1
  |
1 | yaah::aoc_main! { aoc2022 }
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `aoc2021`
  |
  = note: this error originates in the macro `yaah::aoc_main` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0425, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `aoc2021` due to 2 previous errors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.