c sphinx.addnodesdocument)}( rawsource children](translations
LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba
attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/rust/general-informationmodnameN classnameNrefexplicitutagnamehhhubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/rust/general-informationmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/rust/general-informationmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/rust/general-informationmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/rust/general-informationmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/rust/general-informationmodnameN classnameNrefexplicituh1hhhubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h
hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/rust/general-information.rsthKubhsection)}(hhh](htitle)}(hGeneral Informationh]hGeneral Information}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hcThis document contains useful information to know when working with
the Rust support in the kernel.h]hcThis document contains useful information to know when working with
the Rust support in the kernel.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h
``no_std``h]hliteral)}(hhh]hno_std}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hThe Rust support in the kernel can link only `core `_,
but not `std `_. Crates for use in the
kernel must opt into this behavior using the ``#![no_std]`` attribute.h](h-The Rust support in the kernel can link only }(hhhhhNhNubh reference)}(h)`core `_h]hcore}(hhhhhNhNubah}(h]h ]h"]h$]h&]namecorerefurihttps://doc.rust-lang.org/core/uh1hhhubhtarget)}(h" h]h}(h]coreah ]h"]coreah$]h&]refurij uh1j
referencedKhhubh
,
but not }(hhhhhNhNubh)}(h'`std `_h]hstd}(hj% hhhNhNubah}(h]h ]h"]h$]h&]namestdj https://doc.rust-lang.org/std/uh1hhhubj )}(h! h]h}(h]stdah ]h"]stdah$]h&]refurij5 uh1j j KhhubhE. Crates for use in the
kernel must opt into this behavior using the }(hhhhhNhNubh)}(h``#![no_std]``h]h
#![no_std]}(hjG hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh attribute.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK
hhhhubj )}(h.. _rust_code_documentation:h]h}(h]h ]h"]h$]h&]refidrust-code-documentationuh1j hKhhhhhhubeh}(h]no-stdah ]h"]no_stdah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hCode documentationh]hCode documentation}(hjv hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs hhhhhKubh)}(hWRust kernel code is documented using ``rustdoc``, its built-in documentation
generator.h](h%Rust kernel code is documented using }(hj hhhNhNubh)}(h``rustdoc``h]hrustdoc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh', its built-in documentation
generator.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjs hhubh)}(hThe generated HTML docs include integrated search, linked items (e.g. types,
functions, constants), source code, etc. They may be read at:h]hThe generated HTML docs include integrated search, linked items (e.g. types,
functions, constants), source code, etc. They may be read at:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjs hhubhblock_quote)}(hhttps://rust.docs.kernel.org
h]h)}(hhttps://rust.docs.kernel.orgh]h)}(hj h]hhttps://rust.docs.kernel.org}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhjs hhubh)}(hFor linux-next, please see:h]hFor linux-next, please see:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjs hhubj )}(h#https://rust.docs.kernel.org/next/
h]h)}(h"https://rust.docs.kernel.org/next/h]h)}(hj h]h"https://rust.docs.kernel.org/next/}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhK!hj ubah}(h]h ]h"]h$]h&]uh1j hhhK!hjs hhubh)}(h0There are also tags for each main release, e.g.:h]h0There are also tags for each main release, e.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjs hhubj )}(h#https://rust.docs.kernel.org/6.10/
h]h)}(h"https://rust.docs.kernel.org/6.10/h]h)}(hj h]h"https://rust.docs.kernel.org/6.10/}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurij uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhK%hj ubah}(h]h ]h"]h$]h&]uh1j hhhK%hjs hhubh)}(hXl 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
are needed. This has the added advantage that they will be tailored to
the particular kernel configuration used. To generate them, use the ``rustdoc``
target with the same invocation used for compilation, e.g.::h](hX$ 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
are needed. This has the added advantage that they will be tailored to
the particular kernel configuration used. To generate them, use the }(hj6 hhhNhNubh)}(h``rustdoc``h]hrustdoc}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6 ubh<
target with the same invocation used for compilation, e.g.:}(hj6 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hjs hhubh
literal_block)}(hmake LLVM=1 rustdoch]hmake LLVM=1 rustdoc}hjX sbah}(h]h ]h"]h$]h&]hhuh1jV hhhK-hjs hhubh)}(h8To read the docs locally in your web browser, run e.g.::h]h7To read the docs locally in your web browser, run e.g.:}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjs hhubjW )}(h