{"id":17396851,"url":"https://github.com/faern/adventofcode2016","last_synced_at":"2025-03-31T13:42:49.864Z","repository":{"id":90202114,"uuid":"74973657","full_name":"faern/adventofcode2016","owner":"faern","description":"My solutions to http://adventofcode.com/2016","archived":false,"fork":false,"pushed_at":"2016-12-03T09:24:29.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T13:13:37.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/faern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-28T13:04:46.000Z","updated_at":"2016-12-01T10:25:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"140d06e9-42fc-4711-9092-0c12ed3a6c56","html_url":"https://github.com/faern/adventofcode2016","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faern%2Fadventofcode2016","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faern%2Fadventofcode2016/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faern%2Fadventofcode2016/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faern%2Fadventofcode2016/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faern","download_url":"https://codeload.github.com/faern/adventofcode2016/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246475931,"owners_count":20783755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T13:13:39.454Z","updated_at":"2025-03-31T13:42:49.841Z","avatar_url":"https://github.com/faern.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advent of Code 2016, faern's solutions\n\nHere are my solutions built in Rust. The folder structure is as follows:\n\n* `aoc/` - The CLI for the problem solver. Read below how to use it.\n* `dayX/` - The crate containing the solution for dayX.\n* `base/` - Some shared interfaces and utilities between the solutions and the\n  CLI. Such as the enum abstraction for a `Part` denoting if we are solving\n  part one or two on a given day.\n\n## How to use\n\n### Compile\n\n* Get a working Rust environment. see https://rustup.rs/. Should work fine with\n  both stable and nightly.\n* Cd into `aoc/`.\n* Run `cargo build --release` to compile with optimizations.\n\n### Run\n\n* Run `./target/release/aoc --help` for help\n  * The flag `--day X` will select problem for day `X`\n  * The flag `--part Y` will select part `Y`, must be 1 or 2\n  * The flag `--input \u003cpath\u003e` selects which problem input file to read from\n\n#### Example usage\n\n```\n$ ./target/release/aoc --day 1 --part 1 --input inputs/1\nSolution: 301\nTime to solve: 130 us\n```\n\n### Benchmark\n\nSince it might be interesting to know how fast the solution can be obtained\nI added a benchmarking mode to the program.\n\n#### Prerequisites\n\nTo get the benchmark feature one must have the nightly version of Rust and\nbuild the `aoc` crate with the feature `bench`:\n\n`cargo build --release --features \"bench\"`\n\nOr if nightly is not your default toolchain:\n\n`rustup run nightly cargo build --release --features \"bench\"`\n\n#### Running benchmarks\n\nIt's as easy as adding the `--bench` flag to the run:\n\n```\n$ ./target/release/aoc --day 1 --part 1 --input inputs/1 --bench\n     21,765 ns/iter (+/- 2,916)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaern%2Fadventofcode2016","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaern%2Fadventofcode2016","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaern%2Fadventofcode2016/lists"}