File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,12 @@ such a file.
10
10
11
11
#### Bzlmod
12
12
13
- First, ensure `rules_rust` is setup in your workspace. By default, `rust_register_toolchains` will
14
- ensure a [rust_analyzer_toolchain](#rust_analyzer_toolchain) is registered within the WORKSPACE.
15
-
16
- Next, load the dependencies for the `rust-project.json` generator tool:
13
+ First, ensure `rules_rust` is setup in your workspace:
17
14
18
15
```python
19
- # BUILD .bazel
16
+ # MODULE .bazel
20
17
21
- load("@ rules_rust//tools/rust_analyzer:deps.bzl ", "rust_analyzer_dependencies ")
18
+ bazel_dep(name = " rules_rust", version = "0.59.2 ")
22
19
```
23
20
24
21
Bazel will create the target `@rules_rust//tools/rust_analyzer:gen_rust_project`, which you can build
@@ -35,7 +32,8 @@ rust-analyzer can pick it up upon restart.
35
32
36
33
#### WORKSPACE
37
34
38
- As with Bzlmod, ensure `rules_rust` is setup in your workspace.
35
+ Alternatively, you can use the legacy WORKSPACE approach. As with Bzlmod, ensure `rules_rust` is
36
+ setup in your workspace.
39
37
40
38
Moreover, when loading the dependencies for the tool, you should call the function `rust_analyzer_dependencies()`:
41
39
You can’t perform that action at this time.
0 commit comments