summaryrefslogtreecommitdiff
path: root/docs/markdown/Rust.md
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-08-11 15:28:25 -0700
committerEli Schwartz <eschwartz93@gmail.com>2022-09-12 18:51:27 -0400
commit9a645c1c5a3a30d48f5addc1e4d73d9144ac8356 (patch)
treea93588d0ba410dd835e0a6089e83d87a86eaa006 /docs/markdown/Rust.md
parent0ef3c2b4366f0e6256d55b3e5967bde681b6d606 (diff)
downloadmeson-9a645c1c5a3a30d48f5addc1e4d73d9144ac8356.tar.gz
rust: Generate a rust-project.json file when rust targets are present
When at least one Rust target is present, we now generate a rust-project.json file, which can be consumed by rust-analyzer. This is placed in the build directory, and the editor must be configured to look for this (as it is not a default search path).
Diffstat (limited to 'docs/markdown/Rust.md')
-rw-r--r--docs/markdown/Rust.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index 97a98dc90..b7e36e3c7 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.