Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: rust: improve main page introducing a "Code documentation" section

Clean the "Rust" main page by introducing a 'Code documentation" section
to separate it from the rest of the text above.

In addition, introduce the "Rust code documentation" term, which may be
clearer than referring to a potentially unknown tool.

Furthermore, for the HTML case, homogenize both `rustdoc` and
non-`rustdoc` cases and use the term introduced above instead.

Then, always generate the pregenerated version part, since now there
is a section that is always generated and thus makes sense to do so.

Finally, finish the new section with a link to more details about the
Rust code documentation.

The intention is that:

- The non-HTML case mentions the code documentation too, making it
more prominent for readers of non-HTML docs.

- Both HTML cases read more naturally.

- The pregenerated version is always mentioned, since it is likely
useful for readers of non-HTML docs.

Link: https://lore.kernel.org/r/20240818141200.386899-2-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

+17 -4
+2
Documentation/rust/general-information.rst
··· 15 15 kernel must opt into this behavior using the ``#![no_std]`` attribute. 16 16 17 17 18 + .. _rust_code_documentation: 19 + 18 20 Code documentation 19 21 ------------------ 20 22
+15 -4
Documentation/rust/index.rst
··· 25 25 configurations. 26 26 27 27 28 + Code documentation 29 + ------------------ 30 + 31 + Given a kernel configuration, the kernel may generate Rust code documentation, 32 + i.e. HTML rendered by the ``rustdoc`` tool. 33 + 28 34 .. only:: rustdoc and html 29 35 30 - You can also browse `rustdoc documentation <rustdoc/kernel/index.html>`_. 36 + This kernel documentation was built with `Rust code documentation 37 + <rustdoc/kernel/index.html>`_. 31 38 32 39 .. only:: not rustdoc and html 33 40 34 - This documentation does not include rustdoc generated information. 35 - A pregenerated version is provided at: 41 + This kernel documentation was not built with Rust code documentation. 36 42 37 - https://rust.docs.kernel.org 43 + A pregenerated version is provided at: 44 + 45 + https://rust.docs.kernel.org 46 + 47 + Please see the :ref:`Code documentation <rust_code_documentation>` section for 48 + more details. 38 49 39 50 .. toctree:: 40 51 :maxdepth: 1