Re: [PATCH v6 0/2] docs: Integrate rustdoc into Rust documentation

From: Jonathan Corbet
Date: Fri Feb 03 2023 - 12:56:12 EST


Carlos Bilbao <carlos.bilbao@xxxxxxx> writes:

> Include HTML output generated with rustdoc into the Linux kernel
> documentation on Rust.
>
> Carlos Bilbao:
> docs: Move rustdoc output, cross-reference it
> docs: Integrate rustdoc generation into htmldocs
>
So I spent a fair while messing with this, really hoping to get it
merged for 6.3, but I think it's still just too fragile.

- With a too-new version of bindgen it kills the htmldocs build
entirely. If we can't build the Rust docs successfully with the
toolchain that the user has installed then so be it, but it shouldn't
wreck the docs build entirely.

- It still throws the user into the "make oldconfig" process, which is
unexpected for a docs build. This happens even on a system with no
Rust installed at all.

- I dumped my Fedora toolchain and did the curl|bash ritual to set up
the proper versions with rustup. It would be nice to have some better
documentation on how to do that ... *how* to install bindgen may not
be obvious to all users. It also failed until I installed lld
separately.

On a system with the right tool versions, and with a kernel already
configured to build the Rust support, it worked nicely, though.

I'd really like to see a solution that (1) doesn't kill the docs build
process if the tool versions are wrong, and (2) doesn't force the
creation of a kernel configuration. What are our chances of getting
there?

Thanks,

jon