<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/scripts/generate_rust_analyzer.py, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-07-08T11:37:31+00:00</updated>
<entry>
<title>Merge branch 'rust-analyzer-next' of https://github.com/Rust-for-Linux/linux.git</title>
<updated>2026-07-08T11:37:31+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-07-08T11:37:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=74a75a0d2e273a8f6dc4bd859c564f4b5dadeaac'/>
<id>urn:sha1:74a75a0d2e273a8f6dc4bd859c564f4b5dadeaac</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rust: zerocopy-derive: enable support in kbuild</title>
<updated>2026-06-09T02:13:23+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2026-06-08T14:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=506054980429497d106261568bd39c22a40e0fdd'/>
<id>urn:sha1:506054980429497d106261568bd39c22a40e0fdd</id>
<content type='text'>
With all the new files in place and ready from the new crate, enable
the support for it in the build system.

In addition, skip formatting for this vendored crate.

Link: https://patch.msgid.link/20260608141439.182634-18-ojeda@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: zerocopy: enable support in kbuild</title>
<updated>2026-06-09T02:13:22+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2026-06-08T14:14:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=567621523ab7a2bc4a923757cba30bde8900447a'/>
<id>urn:sha1:567621523ab7a2bc4a923757cba30bde8900447a</id>
<content type='text'>
With all the new files in place and ready from the new crate, enable
the support for it in the build system.

In addition, skip formatting for this vendored crate.

Finally, there are no generated symbols expected from `zerocopy`, thus
skip adding the `exports` generation.

Link: https://patch.msgid.link/20260608141439.182634-13-ojeda@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer: support passing env vars</title>
<updated>2026-06-09T02:13:21+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2026-06-08T14:14:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8b1549eee9c7f27b4f4f7c7f575c3c50065b89ff'/>
<id>urn:sha1:8b1549eee9c7f27b4f4f7c7f575c3c50065b89ff</id>
<content type='text'>
A future commit adding `zerocopy` support will need to pass an environment
variable during its build.

Thus add support for an `--envs` parameter, similar to `--cfgs`, that
allows to pass a map of variables to set for a given crate.

This allows us to keep a single source of truth for those values.

No change intended in the generated `rust-project.json`.

Acked-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Link: https://patch.msgid.link/20260608141439.182634-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer.py: pass cfg to macros crate</title>
<updated>2026-06-03T14:30:07+00:00</updated>
<author>
<name>Malte Wechter</name>
<email>maltewechter@gmail.com</email>
</author>
<published>2026-06-03T14:20:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5f45afb8ab04d934fc0601a202f95267ebc20059'/>
<id>urn:sha1:5f45afb8ab04d934fc0601a202f95267ebc20059</id>
<content type='text'>
The configuration passed to rust-analyzer for the `macros` create is
different from the configuration used to build the crate. Update
rust-analyzer configuration for the `macros` crate to reflect the
settings used to compile the crate. Without this change, rust-analyzer
does not understand conditional compilation gated by configuration
redicates based on the `CONFIG_*`configuration values in the macros
crate.

[ Tamir: reworded subject in keeping with convention. ]

Fixes: 36174d16f3ec ("rust: kunit: support KUnit-mapped `assert!` macros in `#[test]`s")
Signed-off-by: Malte Wechter &lt;maltewechter@gmail.com&gt;
Link: https://patch.msgid.link/20260603-rust-analyzer-macro-v3-1-9f7fdb4908e5@gmail.com
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: support overriding crate_name</title>
<updated>2026-04-03T09:57:35+00:00</updated>
<author>
<name>Alice Ryhl</name>
<email>aliceryhl@google.com</email>
</author>
<published>2026-04-02T10:55:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7e9535ebd05d7e8de155164b7c97a370d4646e06'/>
<id>urn:sha1:7e9535ebd05d7e8de155164b7c97a370d4646e06</id>
<content type='text'>
Currently you cannot filter out the crate-name argument
RUSTFLAGS_REMOVE_stem.o because the Rust filter-out invocation does not
include that particular argument. Since --crate-name is an argument that
can't be passed multiple times, this means that it's currently not
possible to override the crate name. Thus, remove the --crate-name
argument for drivers. This allows them to override the crate name using
the #![crate_name] annotation.

This affects symbol names, but has no effect on the filenames of object
files and other things generated by the build, as we always use --emit
with a fixed output filename.

The --crate-name argument is kept for the crates under rust/ for
simplicity and to avoid changing many of them by adding #![crate_name].

The rust analyzer script is updated to use rustc to obtain the crate
name of the driver crates, which picks up the right name whether it is
configured via #![crate_name] or not. For readability, the logic to
invoke 'rustc' is extracted to its own function.

Note that the crate name in the python script is not actually that
important - the only place where the name actually affects anything is
in the 'deps' array which specifies an index and name for each
dependency, and determines what that dependency is called in *this*
crate. (The same crate may be called different things in each
dependency.) Since driver crates are leaf crates, this doesn't apply and
the rustc invocation only affects the 'display_name' parameter.

Acked-by: Gary Guo &lt;gary@garyguo.net&gt;
Signed-off-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Reviewed-by: Jesung Yang &lt;y.jems.n@gmail.com&gt;
Acked-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Link: https://patch.msgid.link/20260402-binder-crate-name-v4-1-ec3919b87909@google.com
[ Applied Python type hints. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer.py: reduce cfg plumbing</title>
<updated>2026-03-09T17:20:09+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2026-01-27T13:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5c8d16ac49405c5b77c955684849528f7d4d6b81'/>
<id>urn:sha1:5c8d16ac49405c5b77c955684849528f7d4d6b81</id>
<content type='text'>
Pass `pin_init{,_internal}-cfgs` from rust/Makefile to
scripts/generate_rust_analyzer.py. Remove hardcoded `cfg`s in
scripts/generate_rust_analyzer.py for `pin-init{,-internal}` now that
these are passed from `rust/Makefile`.

Centralize `cfg` lookup in scripts/generate_rust_analyzer.py in
`append_crate` to avoid having to do so for each crate.

Reviewed-by: Jesung Yang &lt;y.j3ms.n@gmail.com&gt;
Acked-by: Benno Lossin &lt;lossin@kernel.org&gt;
Acked-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Link: https://patch.msgid.link/20260127-rust-analyzer-pin-init-duplication-v3-2-118c48c35e88@kernel.org
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer.py: rename cfg to generated_cfg</title>
<updated>2026-03-09T17:20:09+00:00</updated>
<author>
<name>Eliot Courtney</name>
<email>ecourtney@nvidia.com</email>
</author>
<published>2026-01-20T08:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dc6b431f18cfb1e8cc7da45c16ccf371bcd636d5'/>
<id>urn:sha1:dc6b431f18cfb1e8cc7da45c16ccf371bcd636d5</id>
<content type='text'>
This variable is for the cfg from generated files. It's also easy to
confuse with the `cfg` parameter in append_crate(), so rename it.

[ Changed title to include script extension. - Tamir ]

Signed-off-by: Eliot Courtney &lt;ecourtney@nvidia.com&gt;
Reviewed-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
Link: https://patch.msgid.link/20260120-ra-fix-v1-1-829e4e92818c@nvidia.com
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer.py: avoid FD leak</title>
<updated>2026-03-09T17:20:09+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2026-01-27T16:35:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9b4744d8eda2824041064a5639ccbb079850914d'/>
<id>urn:sha1:9b4744d8eda2824041064a5639ccbb079850914d</id>
<content type='text'>
Use `pathlib.Path.read_text()` to avoid leaking file descriptors.

Fixes: 8c4555ccc55c ("scripts: add `generate_rust_analyzer.py`")
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Almeida &lt;daniel.almeida@collabora.com&gt;
Reviewed-by: Fiona Behrens &lt;me@kloenk.dev&gt;
Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Link: https://patch.msgid.link/20260127-rust-analyzer-fd-leak-v2-1-1bb55b9b6822@kernel.org
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
</content>
</entry>
<entry>
<title>scripts: generate_rust_analyzer.py: define scripts</title>
<updated>2026-03-09T17:20:08+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@kernel.org</email>
</author>
<published>2026-01-22T16:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=36c619f6bd793493294becb10a02fea370b67a91'/>
<id>urn:sha1:36c619f6bd793493294becb10a02fea370b67a91</id>
<content type='text'>
Add IDE support for host-side scripts written in Rust. This support has
been missing since these scripts were initially added in commit
9a8ff24ce584 ("scripts: add `generate_rust_target.rs`"), thus add it.

Change the existing instance of extension stripping to
`pathlib.Path.stem` to maintain code consistency.

Fixes: 9a8ff24ce584 ("scripts: add `generate_rust_target.rs`")
Cc: stable@vger.kernel.org
Reviewed-by: Daniel Almeida &lt;daniel.almeida@collabora.com&gt;
Reviewed-by: Fiona Behrens &lt;me@kloenk.dev&gt;
Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Link: https://patch.msgid.link/20260122-rust-analyzer-scripts-v1-1-ff6ba278170e@kernel.org
Signed-off-by: Tamir Duberstein &lt;tamird@kernel.org&gt;
</content>
</entry>
</feed>
