Re: [RFC PATCH 2/2] Documentation: dev-tools: add kconfirm

Miguel Ojeda
2026-04-29T00:39:09Z

On Tue, Apr 28, 2026 at 8:45 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> I agree with the sentiment that more host tools may want to be written
> in Rust. The Rust build in the kernel does not use cargo altogether, do
> we want the same restriction for host programs? Would these tools be
> able to share the Rust build rules so that we could have a simple
> hostprogs syntax for tools integrating with Kbuild to use? Obviously, it
> might be harder for some programs not to use some of the nice third
> party libraries available but it seems like it would eliminate the build
> system considerations from the discussion at that point.

Yeah, we have already 3 hostprogs in the tree, which just call the
compiler, but it would be nice to have a way to use ecosystem crates
for those and userprogs etc., even if just a particular vetted set.

Otherwise, it is quite painful sometimes to use Rust, and one may
prefer something like Python instead (like we did for
`scripts/generate_rust_analyzer.py`). Python works great for many
tasks thanks to its standard library, but we lose the advantages of
something like Rust. On the other hand, Rust without a few crates to
support certain common things isn't great.

I wouldn't say it is a rush, but it would be nice to agree on an
initial vetted set and try to set something up so that eventually it
is easy to write scripts/tools/hostprogs in Rust going forward.

We could also consider an earlier MSRV for those, i.e. lower than the
kernel image one, if that would allow us to use it in more places,
like for hostprogs without assuming `CONFIG_RUST=y`. Say, Debian
Oldstable instead of Stable.

Cheers,
Miguel