Skip to content

Commit 7744180

Browse files
committed
[Doc] Clean up the bzlmod approach as much as possible
1 parent dd50364 commit 7744180

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

docs/rust_analyzer.vm

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@ such a file.
1010

1111
#### Bzlmod
1212

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:
1714

1815
```python
19-
# BUILD.bazel
16+
# MODULE.bazel
2017

21-
load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")
18+
bazel_dep(name = "rules_rust", version = "0.59.2")
2219
```
2320

2421
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.
3532

3633
#### WORKSPACE
3734

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.
3937

4038
Moreover, when loading the dependencies for the tool, you should call the function `rust_analyzer_dependencies()`:
4139

0 commit comments

Comments
 (0)