Re: [RFC] Integrate Rust code documentation into Documentation/

From: Miguel Ojeda
Date: Mon Nov 21 2022 - 18:52:22 EST


On Mon, Nov 21, 2022 at 10:39 PM Jonathan Corbet <corbet@xxxxxxx> wrote:
>
> Carlos Bilbao <bilbao@xxxxxx> writes:
>
> > I propose we include in 'make htmldocs' the option to integrate
> > rustdoc-generated information. We could create and use
> > Documentation/rust/rustdoc.rst as linking point for that HTML. This
> > wouldn't be costly for the kernel itself. More importantly, the kernel
> > website could host this information by default.
>
> I'm all in favor of including that output, just haven't had the time to
> try to figure out how to make it actually work. Got a patch that
> implements this behavior? :)

Agreed, generating them in `make htmldocs` is also what Konstantin
(Cc'd) proposed a long time ago. In which case, I assume he will need
to add the toolchain to some infrastructure so that we actually get
them.

There are a couple bits to handle: they should only be generated if
the Rust toolchain is available (and if the Rust support is enabled,
really; and probably that suggested `rustdoc.rst` should reflect the
result too). Also, the existing target depends on a kernel config --
we may use x86_64 allyesconfig for the moment.

Cheers,
Miguel