You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-platform template for solving Advent of Code in Rust.
5
+
Solutions for [Advent of Code](https://adventofcode.com/) in [Rust](https://www.rust-lang.org/).
6
6
7
7
<!--- advent_readme_stars table --->
8
8
9
-
## Setup
9
+
---
10
+
11
+
## Template setup
12
+
13
+
This template supports all major OS (macOS, Linux, Windows).
10
14
11
15
### Create your repository
12
16
@@ -26,7 +30,7 @@ Cross-platform template for solving Advent of Code in Rust.
26
30
27
31
## Usage
28
32
29
-
### Setup new day
33
+
### Scaffold a day
30
34
31
35
```sh
32
36
# example: `cargo scaffold 1`
@@ -46,7 +50,7 @@ Every [solution](https://github.com/fspoettel/advent-of-code-rust/blob/master/sr
46
50
47
51
When editing a solution, `rust-analyzer` will display buttons for these actions above the unit tests.
48
52
49
-
### Download inputs for a day
53
+
### Download input for a day
50
54
51
55
> **Note**
52
56
> This command requires [installing the aoc-cli crate](#download-inputs-via-aoc-cli).
@@ -90,7 +94,7 @@ cargo day <day>
90
94
91
95
Displayed _timings_ show the raw execution time of your solution without overhead (e.g. file reads).
92
96
93
-
### Run solutions for all days
97
+
### Run all solutions
94
98
95
99
```sh
96
100
cargo all
@@ -135,7 +139,7 @@ cargo clippy
135
139
136
140
## Optional template features
137
141
138
-
### Download inputs via aoc-cli
142
+
### Download puzzle inputs via aoc-cli
139
143
140
144
1. Install [`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo: `cargo install aoc-cli`.
141
145
2. Create an `.adventofcode.session` file in your home directory and paste your session cookie into it. To get this, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in your Cookies under the Application or Storage tab, and copy out the `session` cookie value.
@@ -145,17 +149,17 @@ Once installed, you can use the [download command](#download-inputs-for-a-day).
145
149
> **Note**
146
150
> The session cookie might expire after a while (~1 month) which causes the downloads to fail. To fix this issue, refresh the `.adventofcode.session` file.
147
151
148
-
### CI: enable clippy lints
152
+
### Enable clippy lints in CI
149
153
150
154
Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI.
151
155
152
-
### Readme progress tracker
156
+
### Automatically track ⭐️ progress in readme
153
157
154
158
This template includes [a Github action](https://github.com/k2bd/advent-readme-stars) that automatically updates the readme with your advent of code progress.
155
159
156
160
To enable it, complete the following steps:
157
161
158
-
#### 1. Create private leaderboard
162
+
#### 1. Create a private leaderboard
159
163
160
164
Go to the leaderboard page of the year you want to track and click _Private Leaderboard_. If you have not created a leaderboard yet, create one by clicking _Create It_. Your leaderboard should be accessible under `https://adventofcode.com/{year}/leaderboard/private/view/{aoc_user_id}`.
0 commit comments