[PATCH v2 2/2] scripts: generate_rust_analyzer.py: add uapi crate

Tamir Duberstein
2025-02-10T18:04:21Z

Commit 4e1746656839 ("rust: uapi: Add UAPI crate") did not update
rust-analyzer to include the new crate.

Add the missing definition to improve the developer experience.

Fixes: 4e1746656839 ("rust: uapi: Add UAPI crate")
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
scripts/generate_rust_analyzer.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index 1f573d19cd99..d3fe091a55dd 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -105,7 +105,8 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
}

append_crate_with_generated("bindings", ["core"])
- append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings"])
+ append_crate_with_generated("uapi", ["core"])
+ append_crate_with_generated("kernel", ["core", "macros", "build_error", "bindings", "uapi"])

def is_root_crate(build_file, target):
try:

--
2.48.1