Subject: Re: [PATCH v4 2/4] ynl_gen: generate Rust files from yaml files

From: Alice Ryhl <[email-masked]>
Date: Tue, 5 May 2026 09:10:17 +0000

On Mon, May 04, 2026 at 04:58:58PM -0700, Jakub Kicinski wrote:
> On Mon, 04 May 2026 09:04:55 +0000 Alice Ryhl wrote:
> >  tools/net/ynl/pyynl/ynl_gen_c.py | 139 ++++++++++++++++++++++++++++++++++++++-
> 
> No. Rust. In. This. File.
> 
> Just commit the artifacts. I truly hope that this is the only Netlink
> family we will have in Rust.

There's no reason to react like this. I have not ignored your concern.
Last time we discussed this, the discussion ended on splitting the file
into ynl_gen_c.py and ynl_gen_rust.py, which you did not reply to, and I
actually spent some time working on that. However, I felt the change was
non-trivial and I wanted to discuss whether that was the correct way
forward before spending more time on it. Therefore, I kept this patch
as-is for now and noted why it was non-trivial (sharing of CodeWriter)
in the commit message, until we could discuss further.

I think you are probably right that just comitting the artifacts is the
simplest way forward for now. Especially since Donald is apparently
working on splitting up the file for strace [1]. On the off-chance that
a second Netlink family is ever added, hopefully Donald's work has
already completed and we can easily add this support in a new file when
the time comes.

I guess another way forward is to commit a copy of the python script
with the Rust support to drivers/android/binder/ and I can run it
manually if the Binder yaml file is ever updated.

Alice

[1]: https://lore.kernel.org/r/[email-masked]