]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
docs: rust: no_std is used
authorDirk Behme <dirk.behme@de.bosch.com>
Mon, 10 Jun 2024 12:23:32 +0000 (14:23 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Mon, 8 Jul 2024 21:44:00 +0000 (23:44 +0200)
Using the #![no_std] attribute in the Rust kernel support is different
to the default Rust usage. Mention this in the Documentation.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Reviewed-by: Trevor Gross <tmgross@umich.edu>
Link: https://lore.kernel.org/r/20240610122332.3858571-1-dirk.behme@de.bosch.com
[ Avoided breaking links in two lines. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Documentation/rust/general-information.rst

index 4bb6ac12d482c5c98a03de072f318254e3d941cb..e3f388ef4ee42332f26005151fcff53b817d48ef 100644 (file)
@@ -7,6 +7,14 @@ This document contains useful information to know when working with
 the Rust support in the kernel.
 
 
+``no_std``
+----------
+
+The Rust support in the kernel can link only `core <https://doc.rust-lang.org/core/>`_,
+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.
+
+
 Code documentation
 ------------------