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
Copy file name to clipboardExpand all lines: README.md
+12-12
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,14 @@ Solutions for [Advent of Code](https://adventofcode.com/) in [Rust](https://www.
14
14
15
15
This template supports all major OS (macOS, Linux, Windows).
16
16
17
-
### Create your repository 📝
17
+
### 📝 Create your repository
18
18
19
19
1. Open [the template repository](https://github.com/fspoettel/advent-of-code-rust) on Github.
20
20
2. Click [Use this template](https://github.com/fspoettel/advent-of-code-rust/generate) and create your repository.
21
21
3. Clone your repository to your computer.
22
22
4. If you are solving a previous year's advent of code, change the `AOC_YEAR` variable in `.cargo/config.toml` to reflect the year you are solving.
23
23
24
-
### Setup rust 💻
24
+
### 💻 Setup rust
25
25
26
26
1. Install the [Rust toolchain](https://www.rust-lang.org/tools/install).
27
27
2. (recommended) Install the [rust-analyzer](https://rust-analyzer.github.io/manual.html) extension for your code editor.
@@ -33,7 +33,7 @@ This template supports all major OS (macOS, Linux, Windows).
33
33
34
34
## Usage
35
35
36
-
### Scaffold a day
36
+
### ➡️ Scaffold a day
37
37
38
38
```sh
39
39
# example: `cargo scaffold 1`
@@ -54,12 +54,12 @@ Every [solution](https://github.com/fspoettel/advent-of-code-rust/blob/main/src/
54
54
> [!TIP]
55
55
> If a day has different example inputs for both parts, you can use the `read_file_part()` helper in your tests instead of `read_file()`. For example, if this applies to day 1, you can create a second example file `01-2.txt` and invoke the helper like `let result = part_two(&advent_of_code::template::read_file_part("examples", DAY, 2));` to read it in `test_part_two`.
56
56
57
-
### Download input & description for a day
57
+
### ➡️ Download input for a day
58
58
59
59
> [!IMPORTANT]
60
60
> This requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
61
61
62
-
You can automatically download puzzle inputs and description by either appending the `--download` flag to `scaffold` (e.g. `cargo scaffold 4 --download`) or with the separate `download` command:
62
+
You can automatically download puzzle input and description by either appending the `--download` flag to `scaffold` (e.g. `cargo scaffold 4 --download`) or with the separate `download` command:
63
63
64
64
```sh
65
65
# example: `cargo download 1`
@@ -74,7 +74,7 @@ cargo download <day>
74
74
# 🎄 Successfully wrote puzzle to "data/puzzles/01.md".
75
75
```
76
76
77
-
### Run solutions for a day
77
+
### ➡️ Run solutions for a day
78
78
79
79
```sh
80
80
# example: `cargo solve 01`
@@ -100,7 +100,7 @@ For example, running a benchmarked, optimized execution of day 1 would look like
100
100
101
101
In order to submit part of a solution for checking, append the `--submit <part>` option to the `solve` command.
102
102
103
-
### Run all solutions
103
+
### ➡️ Run all solutions
104
104
105
105
```sh
106
106
cargo all
@@ -124,27 +124,27 @@ The template can output a table with solution times to your readme. In order to
124
124
125
125
Please note that these are not "scientific" benchmarks, understand them as a fun approximation. 😉 Timings, especially in the microseconds range, might change a bit between invocations.
126
126
127
-
### Run all tests
127
+
### ➡️ Run all tests
128
128
129
129
```sh
130
130
cargo test
131
131
```
132
132
133
133
To run tests for a specific day, append `--bin <day>`, e.g. `cargo test --bin 01`. You can further scope it down to a specific part, e.g. `cargo test --bin 01 part_one`.
134
134
135
-
### Format code
135
+
### ➡️ Format code
136
136
137
137
```sh
138
138
cargo fmt
139
139
```
140
140
141
-
### Lint code
141
+
### ➡️ Lint code
142
142
143
143
```sh
144
144
cargo clippy
145
145
```
146
146
147
-
### Read puzzle description in terminal
147
+
### ➡️ Read puzzle description
148
148
149
149
> [!IMPORTANT]
150
150
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
@@ -159,7 +159,7 @@ cargo read <day>
159
159
# ...the input...
160
160
```
161
161
162
-
### Scaffold, download and read in one go
162
+
### ➡️ Scaffold, download & read the current aoc day
163
163
164
164
> [!IMPORTANT]
165
165
> This command requires [installing the aoc-cli crate](#configure-aoc-cli-integration).
0 commit comments