Skip to content

Commit 4eab9ef

Browse files
committed
Add more prominent references to cargo xtask
I found that Gemini didn’t know how to install the necessary tools make `dprint fmt` work, so I’m adding more references to `cargo xtask` in our documentation.
1 parent 1a5d994 commit 4eab9ef

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
We'd love to accept your patches and contributions to this project. There are
44
just a few small guidelines you need to follow.
55

6-
Make sure you can build the book, and that `mdbook serve` works. Please follow
7-
the [instructions in the README].
6+
Make sure you can build the book with `mdbook build`, that `mdbook serve` works,
7+
and that `dprint fmt` formats the code. Please use `cargo xtask install-tools`
8+
to install the necessary dependencies, following the
9+
[instructions in the README].
810

911
[instructions in the README]: README.md#building
1012

GEMINI.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ tests, and managing translations.
3636
```bash
3737
cargo xtask install-tools
3838
```
39+
This is a necessary first step for working with this repository. It will
40+
install the correct versions of all tools used by the project.
3941

4042
## Commands
4143

@@ -73,7 +75,8 @@ list of options.
7375
- **Course Content:** Markdown files in the `src/` directory, structured
7476
according to `src/SUMMARY.md`.
7577
- **Code Formatting:** `dprint fmt` is used to format all source files according
76-
to `rustfmt.toml` and `dprint.json`.
78+
to `rustfmt.toml` and `dprint.json`. Note that you must first install the
79+
project tools with `cargo xtask install-tools`.
7780
- **Contributions:** Refer to `CONTRIBUTING.md` for guidelines on contributing
7881
to the project.
7982
- **Style:** Refer to `STYLE.md` for style guidelines.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ git clone https://github.com/google/comprehensive-rust/
6565
cd comprehensive-rust
6666
```
6767

68-
Then install these tools with:
68+
Then run the following command to install the correct versions of all tools
69+
mentioned above:
6970

7071
```shell
7172
cargo xtask install-tools
7273
```
7374

74-
> **Note** We use `xtask` for task automation within the project (e.g.
75-
> installing required tools). Xtask is not a package that you should install.
76-
> Visit https://github.com/matklad/cargo-xtask for more information.
75+
This uses `cargo install` to install the tools, so you will find them in your
76+
`~/.cargo/bin/` directory afterwards.
7777

7878
## Commands
7979

0 commit comments

Comments
 (0)