docs: rust: link to https://rust.docs.kernel.org
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/2 docs: rust: link to https://rust.docs.kernel.org
The Rust code documentation (i.e. rustdoc-generated docs) is now available at:
Thus document it and remove the TODO line.
The generation uses a particular kernel configuration, based on x86_64, which may get tweaked over time. Older tags, and how they are generated, may also change in the future. We may consider freezing them at some point, but for the moment, the content should not be considered immutable.
Thanks Konstantin for the support setting it up!
--- Documentation/rust/general-information.rst | 13 ++++++++++--- Documentation/rust/index.rst | 3 +++ 2 files changed, 13 insertions(+), 3 deletions(-)
Documentation/rust/general-information.rst +10 -3
@@ -22,10 +22,17 @@ Rust kernel code is documented using ``rustdoc``, its built-in documentation generator. The generated HTML docs include integrated search, linked items (e.g. types, -functions, constants), source code, etc. They may be read at (TODO: link when -in mainline and generated alongside the rest of the documentation): +functions, constants), source code, etc. They may be read at: - http://kernel.org/ + https://rust.docs.kernel.org + +For linux-next, please see: + + https://rust.docs.kernel.org/next/ + +There are also tags for each main release, e.g.: + + https://rust.docs.kernel.org/6.10/ The docs can also be easily generated and read locally. This is quite fast (same order as compiling the code itself) and no special tools or environment
Documentation/rust/index.rst +3 -0
@@ -32,6 +32,9 @@ configurations. .. only:: not rustdoc and html This documentation does not include rustdoc generated information. + A pregenerated version is provided at: + + https://rust.docs.kernel.org .. toctree:: :maxdepth: 1
base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba
Signature · 1 line
2.46.0
Miguel Ojeda
maintainerPATCH 2/2 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.
--- Documentation/rust/general-information.rst | 2 ++ Documentation/rust/index.rst | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-)
Documentation/rust/general-information.rst +2 -0
@@ -15,6 +15,8 @@ but not `std <https://doc.rust-lang.org/std/>`_. Crates for use in the kernel must opt into this behavior using the ``#![no_std]`` attribute. +.. _rust_code_documentation: + Code documentation ------------------
Documentation/rust/index.rst +15 -4
@@ -25,16 +25,27 @@ support is still in development/experimental, especially for certain kernel configurations. +Code documentation +------------------ + +Given a kernel configuration, the kernel may generate Rust code documentation, +i.e. HTML rendered by the ``rustdoc`` tool. + .. only:: rustdoc and html - You can also browse `rustdoc documentation <rustdoc/kernel/index.html>`_. + This kernel documentation was built with `Rust code documentation + <rustdoc/kernel/index.html>`_. .. only:: not rustdoc and html - This documentation does not include rustdoc generated information. - A pregenerated version is provided at: + This kernel documentation was not built with Rust code documentation. + +A pregenerated version is provided at: + + https://rust.docs.kernel.org - https://rust.docs.kernel.org +Please see the :ref:`Code documentation <rust_code_documentation>` section for +more details. .. toctree:: :maxdepth: 1
Signature · 1 line
2.46.0
Quoted 6 lines · Miguel Ojeda
The generation uses a particular kernel configuration, based on
x86_64, which may get tweaked over time. Older tags, and how they are generated, may also change in the future. We may consider freezing them at some point, but for the moment, the content should not be considered immutable.Thanks Konstantin for the support setting it up!
Happy to help!
-K
Miguel Ojeda
AppliedQuoted 13 lines · Miguel Ojeda
The Rust code documentation (i.e.
rustdoc-generated docs) is now available at:Thus document it and remove the
TODOline.The generation uses a particular kernel configuration, based on
x86_64, which may get tweaked over time. Older tags, and how they are generated, may also change in the future. We may consider freezing them at some point, but for the moment, the content should not be considered immutable.
Quoted 4 lines
Thanks Konstantin for the support setting it up!
Cc Konstantin Ryabitsev <[email protected]>Signed-off-by Miguel Ojeda <[email protected]>
Applied series to rust-next -- thanks!
Cheers,
Miguel