* [PATCH] docs: rust: no_std is used
@ 2024-06-04 7:06 Dirk Behme
2024-06-06 9:14 ` Trevor Gross
0 siblings, 1 reply; 2+ messages in thread
From: Dirk Behme @ 2024-06-04 7:06 UTC (permalink / raw)
To: rust-for-linux; +Cc: Dirk Behme
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>
---
Documentation/rust/general-information.rst | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/rust/general-information.rst b/Documentation/rust/general-information.rst
index 4bb6ac12d482c..bdbafd916daa5 100644
--- a/Documentation/rust/general-information.rst
+++ b/Documentation/rust/general-information.rst
@@ -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 links to the `core-crate <https://doc.rust-
+lang.org/core/>`_ instead of the std-crate. This is done by using
+the ``#![no_std]`` attribute.
+
+
Code documentation
------------------
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs: rust: no_std is used
2024-06-04 7:06 [PATCH] docs: rust: no_std is used Dirk Behme
@ 2024-06-06 9:14 ` Trevor Gross
0 siblings, 0 replies; 2+ messages in thread
From: Trevor Gross @ 2024-06-06 9:14 UTC (permalink / raw)
To: Dirk Behme; +Cc: rust-for-linux
On Tue, Jun 4, 2024 at 2:07 AM Dirk Behme <dirk.behme@de.bosch.com> wrote:
>
> 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>
> ---
> Documentation/rust/general-information.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/rust/general-information.rst b/Documentation/rust/general-information.rst
> index 4bb6ac12d482c..bdbafd916daa5 100644
> --- a/Documentation/rust/general-information.rst
> +++ b/Documentation/rust/general-information.rst
> @@ -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 links to the `core-crate <https://doc.rust-
> +lang.org/core/>`_ instead of the std-crate. This is done by using
> +the ``#![no_std]`` attribute.
This is a good thing to make clear. "instead" probably isn't right
(since core is still linked when std is available), maybe:
...kernel can link only `core <link>`, not ``std`` Crates for use in
the kernel must opt into this behavior using the ``#![no_std]``
attribute.
- Trevor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-06 9:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 7:06 [PATCH] docs: rust: no_std is used Dirk Behme
2024-06-06 9:14 ` Trevor Gross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).