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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m27c4d9hmb.fsf@kloenk.dev>
Date: Tue, 25 Mar 2025 17:53:32 +0100
From: Fiona Behrens <me@...enk.dev>
To: Tamir Duberstein <tamird@...il.com>
Cc: 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>,
  Danilo Krummrich <dakr@...nel.org>,  Boris-Chengbiao Zhou
 <bobo1239@....de>,  Kees Cook <kees@...nel.org>,
  rust-for-linux@...r.kernel.org,  linux-kernel@...r.kernel.org,  Lukas
 Wirth <lukas.wirth@...rous-systems.com>
Subject: Re: [PATCH v4 10/11] scripts: generate_rust_analyzer.py: define
 scripts

Tamir Duberstein <tamird@...il.com> writes:

> Generate rust-project.json entries for scripts written in Rust. This is
> possible now that we have a definition for `std` built for the host.
>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>

Reviewed-by: Fiona Behrens <me@...enk.dev>

> ---
>  scripts/generate_rust_analyzer.py | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index ccb15aa66929..957b413fe0b6 100755
> --- a/scripts/generate_rust_analyzer.py
> +++ b/scripts/generate_rust_analyzer.py
> @@ -209,6 +209,19 @@ def generate_crates(
>      uapi = append_crate_with_generated("uapi", [core])
>      kernel = append_crate_with_generated("kernel", [core, macros, build_error, bindings, pin_init, uapi])
>  
> +    scripts = srctree / "scripts"
> +    with open(scripts / "Makefile") as f:
> +        makefile = f.read()
> +    for path in scripts.glob("*.rs"):
> +        name = path.name.replace(".rs", "")
> +        if f"{name}-rust" not in makefile:
> +            continue
> +        _script = append_crate(
> +            name,
> +            path,
> +            [host_std],
> +        )
> +
>      def is_root_crate(build_file: pathlib.Path, target: str) -> bool:
>          try:
>              with open(build_file) as f:

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ