summaryrefslogtreecommitdiff
path: root/docs/markdown/Rust.md
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-11-30 15:00:14 -0500
committerJohn Turner <jturner.usa@gmail.com>2025-12-20 01:21:48 -0500
commit651fe54d12f07dd98ff94f8a8cea2469e746a590 (patch)
tree2184ce050f47fbdb6f3477216ebed5d8f26ed220 /docs/markdown/Rust.md
parentbfa96def243340841c1752bb63eeb4add92fe25a (diff)
downloadmeson-651fe54d12f07dd98ff94f8a8cea2469e746a590.tar.gz
add clippy-json target
Add a clippy-json target to the ninja script. This is useful for rust-analyzer, which requires an "external check command" to function when not using cargo. Also we add a "clippy-json-prereq" target, and invoke it in the clippy.py script. The prereq target tries to build as much of the project as possible with "-k0".
Diffstat (limited to 'docs/markdown/Rust.md')
-rw-r--r--docs/markdown/Rust.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index 67bbdec5b..69dbc038f 100644
--- a/docs/markdown/Rust.md
+++ b/docs/markdown/Rust.md
@@ -91,6 +91,13 @@ write files into the source directory). [See the upstream
docs](https://rust-analyzer.github.io/book/non_cargo_based_projects.html) for
more information on how to configure that.
+### Clippy
+You can use the "clippy-json" build target as rust-analyer's "check command" to recieve clippy diagnostics in your editor.
+
+Without overriding the check command, the LSP will function in a limited state, only showing certain errors (for example, no borrow checking errors are shown).
+
+[Non cargo based projects](https://rust-analyzer.github.io/book/non_cargo_based_projects.html) shows how to override the check command, you probably want to set it to `ninja clippy-json -C build`.
+
## Linking with standard libraries
Meson will link the Rust standard libraries (e.g. libstd) statically, unless the