aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Rust.md11
-rw-r--r--docs/markdown/snippets/rust_project_json.md5
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index 97a98dc..b7e36e3 100644
--- a/docs/markdown/Rust.md
+++ b/docs/markdown/Rust.md
@@ -54,3 +54,14 @@ executable(
)
)
```
+
+## Use with rust-analyzer
+
+*Since 0.64.0.*
+
+Meson will generate a `rust-project.json` file in the root of the build
+directory if there are any rust targets in the project. Most IDEs will need to
+be configured to use the file as it's not in the source root (Meson does not
+write files into the source directory). [See the upstream
+docs](https://rust-analyzer.github.io/manual.html#non-cargo-based-projects) for
+more information on how to configure that.
diff --git a/docs/markdown/snippets/rust_project_json.md b/docs/markdown/snippets/rust_project_json.md
new file mode 100644
index 0000000..e87a7db
--- /dev/null
+++ b/docs/markdown/snippets/rust_project_json.md
@@ -0,0 +1,5 @@
+## Generates rust-project.json when there are Rust targets
+
+This is a format similar to compile_commands.json, but specifically used by the
+official rust LSP, rust-analyzer. It is generated automatically if there are
+Rust targets, and is placed in the build directory.