lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241006225952.45012-1-luna.xin.lx@gmail.com>
Date: Sun,  6 Oct 2024 18:59:50 -0400
From: Luna Xin <luna.xin.lx@...il.com>
To: Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Boqun Feng <boqun.feng@...il.com>,
	Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <benno.lossin@...ton.me>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>,
	Trevor Gross <tmgross@...ch.edu>
Cc: Luna Xin <luna.xin.lx@...il.com>,
	rust-for-linux@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH] scripts: add `uapi` crate to `generate_rust_analyzer.py`

This patch updates the `generate_rust_analyzer.py` script to include
the `uapi` crate.

This allows a proper `rust-project.json` to be generated by the script
so that driver developers can take advantage of rust-analyzer code
completions when interfacing with `uapi`.

Signed-off-by: Luna Xin <luna.xin.lx@...il.com>
---
 scripts/generate_rust_analyzer.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index d2bc63cde..61214fd2f 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -93,10 +93,18 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
     )
     crates[-1]["env"]["OBJTREE"] = str(objtree.resolve(True))

+    append_crate(
+        "uapi",
+        srctree / "rust"/ "uapi" / "lib.rs",
+        ["core"],
+        cfg=cfg,
+    )
+    crates[-1]["env"]["OBJTREE"] = str(objtree.resolve(True))
+
     append_crate(
         "kernel",
         srctree / "rust" / "kernel" / "lib.rs",
-        ["core", "alloc", "macros", "build_error", "bindings"],
+        ["core", "alloc", "macros", "build_error", "bindings", "uapi"],
         cfg=cfg,
     )
     crates[-1]["source"] = {

base-commit: f5e50614e39e74401b492a2fa125f2e2b6458bab
--
2.46.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ