Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd1e9549

Browse files
committed
docs: clarify readme
1 parent7a3f57f commitd1e9549

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

‎README.md‎

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ This template supports all major OS (macOS, Linux, Windows).
1919

2020
###Create your repository 📝
2121

22-
1.Open[the template repository](https://github.com/fspoettel/advent-of-code-rust) on Github.
23-
2.Click[Use this template](https://github.com/fspoettel/advent-of-code-rust/generate) and create your repository.
24-
3.Clone your repository to your computer.
25-
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.
22+
1. Open[the template repository](https://github.com/fspoettel/advent-of-code-rust) on Github.
23+
2. Click[Use this template](https://github.com/fspoettel/advent-of-code-rust/generate) and create your repository.
24+
3. Clone your repository to your computer.
25+
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.
2626

2727
###Setup rust 💻
2828

29-
1.Install the[Rust toolchain](https://www.rust-lang.org/tools/install).
30-
2.(recommended) Install the[rust-analyzer](https://rust-analyzer.github.io/manual.html) extension for your code editor.
31-
3.(optional) Install a native debugger. If you are using VS Code,[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) is a good option.
29+
1. Install the[Rust toolchain](https://www.rust-lang.org/tools/install).
30+
2. (recommended) Install the[rust-analyzer](https://rust-analyzer.github.io/manual.html) extension for your code editor.
31+
3. (optional) Install a native debugger. If you are using VS Code,[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) is a good option.
3232

3333
---
3434

@@ -166,6 +166,9 @@ cargo read <day>
166166
1. Install[`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo:`cargo install aoc-cli --version 0.12.0`
167167
2. Create an`.adventofcode.session` file in your home directory and paste your session cookie. To retrieve the session cookie, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in_Cookies_ under the_Application_ or_Storage_ tab, and copy out the`session` cookie value.[^1]
168168

169+
>**Note**
170+
>Create the`.adventofcode.session` file (note the dot) in your home directory (/home/alice on Linux, C:\Users\Alice on Windows, /Users/Alice on macOS).
171+
169172
Once installed, you can use the[download command](#download-input--description-for-a-day) and automatically submit solutions via the[`--submit` flag](#submitting-solutions).
170173

171174
###Automatically track ⭐️ progress in the readme
@@ -182,13 +185,13 @@ Go to the leaderboard page of the year you want to track and click _Private Lead
182185

183186
Go to the_Secrets_ tab in your repository settings and create the following secrets:
184187

185-
-`AOC_USER_ID`: Go to[this page](https://adventofcode.com/settings) and copy your user id. It's the number behind the`#` symbol in the first name option. Example:`3031`.
186-
-`AOC_YEAR`: the year you want to track. Example:`2021`.
187-
-`AOC_SESSION`: an active session[^2] for the advent of code website. 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.
188+
-`AOC_USER_ID`: Go to[this page](https://adventofcode.com/settings) and copy your user id. It's the number behind the`#` symbol in the first name option. Example:`3031`.
189+
-`AOC_YEAR`: the year you want to track. Example:`2021`.
190+
-`AOC_SESSION`: an active session[^2] for the advent of code website. 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.
188191

189192
Go to the_Variables_ tab in your repository settings and create the following variable:
190193

191-
-`AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to`true` to enable the progress tracker.
194+
-`AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to`true` to enable the progress tracker.
192195

193196
✨ You can now run this action manually via the_Run workflow_ button on the workflow page. If you want the workflow to run automatically, uncomment the`schedule` section in the`readme-stars.yml` workflow file or add a`push` trigger.
194197

@@ -198,23 +201,23 @@ Uncomment the respective sections in the `ci.yml` workflow.
198201

199202
###Use VS Code to debug your code
200203

201-
1.Install[rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) and[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb).
202-
2.Set breakpoints in your code.[^3]
203-
3.Click_Debug_ next to the unit test or the_main_ function.[^4]
204-
4.The debugger will halt your program at the specific line and allow you to inspect the local stack.[^5]
204+
1. Install[rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) and[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb).
205+
2. Set breakpoints in your code.[^3]
206+
3. Click_Debug_ next to the unit test or the_main_ function.[^4]
207+
4. The debugger will halt your program at the specific line and allow you to inspect the local stack.[^5]
205208

206209
##Useful crates
207210

208-
-[itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
209-
-[regex](https://crates.io/crates/regex): Official regular expressions implementation for Rust.
211+
-[itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
212+
-[regex](https://crates.io/crates/regex): Official regular expressions implementation for Rust.
210213

211214
A curated list of popular crates can be found on[blessred.rs](https://blessed.rs/crates).
212215

213216
Do you have aoc-specific crate recommendations?[Share them!](https://github.com/fspoettel/advent-of-code-rust/edit/main/README.md)
214217

215218
##Common pitfalls
216219

217-
-**Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in`debug` mode, integers[wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in`release` mode, leading to wrong output when running your solution.
220+
-**Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in`debug` mode, integers[wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in`release` mode, leading to wrong output when running your solution.
218221

219222
##Footnotes
220223

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp