Skip to content

alvaro-cuesta/advent-solutions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ„ Advent of Code Solutions (docs)

My solutions for Advent of Code in Rust.

Running

  • Running for your input (requires SESSION environment variable or file):

    $ cargo run
  • Filtering by days:

    $ cargo run dayNN dayMM ...
  • Run all tests:

    $ cargo test
  • Or only some:

    $ cargo test dayNN       # NN = 01, 02, ..., 25
    $ cargo test YYYY        # YYYY = Year
    $ cargo test YYYY::dayNN
  • View docs:

    $ cargo doc --open
  • Upload docs to GitHub:

    $ git worktree add gh-pages gh-pages  # if `gh-pages` worktree is missing
    $ rm -rf target/doc
    $ cargo doc --no-deps
    $ cp -rf target/doc/* gh-pages/
    $ cd gh-pages
    $ git add .
    $ git commit -m "Update gh-pages"
    $ git push

TODO

  • 2017-day20-part1: I'm not sure just comparing by velocity solves it (might be two same-length accelerations, one of them accelerating against same-length v)

  • main.rs

    • If any job panics, it's not handled properly (should be like cargo test)
    • Thread each part separately
    • Async download (limit # to avoid many requests)
  • Add panics to docs

  • Document advent lib

  • Older Advent of Code

  • Ensure all doccomments are on pub types

  • Move test_inputs to src year?

  • Do not return result strings, but a result type