€•œd Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ ”Œchildren”]”(Œtranslations”Œ
LanguagesNode”“”)”}”(hhh]”(h Œpending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ
attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ,/translations/zh_CN/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuŒtagname”hhhubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/zh_TW/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/it_IT/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ja_JP/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/ko_KR/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/pt_BR/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ,/translations/sp_SP/rust/general-information”Œmodname”NŒ classname”NŒrefexplicit”ˆuh1hhhubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h
hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ SPDX-License-Identifier: GPL-2.0”h]”hŒ SPDX-License-Identifier: GPL-2.0”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒF/var/lib/git/docbuild/linux/Documentation/rust/general-information.rst”h´KubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒGeneral Information”h]”hŒGeneral Information”…””}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒcThis document contains useful information to know when working with
the Rust support in the kernel.”h]”hŒcThis document contains useful information to know when working with
the Rust support in the kernel.”…””}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)”}”(hhh]”(hÎ)”}”(hŒ
``no_std``”h]”hŒliteral”“”)”}”(hhòh]”hŒno_std”…””}”(hhöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhhðubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhíh²hh³hÇh´KubhÞ)”}”(hŒåThe 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 ”…””}”(hj h²hh³Nh´NubhŒ reference”“”)”}”(hŒ)`core `_”h]”hŒcore”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œcore”Œrefuri”Œhttps://doc.rust-lang.org/core/”uh1j hj ubhŒtarget”“”)”}”(hŒ" ”h]”h}”(h]”Œcore”ah ]”h"]”Œcore”ah$]”h&]”Œrefuri”j$ uh1j% Œ
referenced”Khj ubhŒ
,
but not ”…””}”(hj h²hh³Nh´Nubj )”}”(hŒ'`std `_”h]”hŒstd”…””}”(hj9 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œstd”j# Œhttps://doc.rust-lang.org/std/”uh1j hj ubj& )”}”(hŒ! ”h]”h}”(h]”Œstd”ah ]”h"]”Œstd”ah$]”h&]”Œrefuri”jI uh1j% j4 Khj ubhŒE. Crates for use in the
kernel must opt into this behavior using the ”…””}”(hj h²hh³Nh´Nubhõ)”}”(hŒ``#![no_std]``”h]”hŒ
#![no_std]”…””}”(hj[ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhj ubhŒ attribute.”…””}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K
hhíh²hubj& )”}”(hŒ.. _rust_code_documentation:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œrust-code-documentation”uh1j% h´Khhíh²hh³hÇubeh}”(h]”Œno-std”ah ]”h"]”Œno_std”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)”}”(hhh]”(hÎ)”}”(hŒCode documentation”h]”hŒCode documentation”…””}”(hjŠ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj‡ h²hh³hÇh´KubhÞ)”}”(hŒWRust kernel code is documented using ``rustdoc``, its built-in documentation
generator.”h]”(hŒ%Rust kernel code is documented using ”…””}”(hj˜ h²hh³Nh´Nubhõ)”}”(hŒ``rustdoc``”h]”hŒrustdoc”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhj˜ ubhŒ', its built-in documentation
generator.”…””}”(hj˜ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj‡ h²hubhÞ)”}”(hŒŠThe generated HTML docs include integrated search, linked items (e.g. types,
functions, constants), source code, etc. They may be read at:”h]”hŒŠThe generated HTML docs include integrated search, linked items (e.g. types,
functions, constants), source code, etc. They may be read at:”…””}”(hj¸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj‡ h²hubhŒblock_quote”“”)”}”(hŒhttps://rust.docs.kernel.org
”h]”hÞ)”}”(hŒhttps://rust.docs.kernel.org”h]”j )”}”(hjÎ h]”hŒhttps://rust.docs.kernel.org”…””}”(hjÐ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jÎ uh1j hjÌ ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhjÈ ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆ h³hÇh´Khj‡ h²hubhÞ)”}”(hŒFor linux-next, please see:”h]”hŒFor linux-next, please see:”…””}”(hjê h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Khj‡ h²hubjÇ )”}”(hŒ#https://rust.docs.kernel.org/next/
”h]”hÞ)”}”(hŒ"https://rust.docs.kernel.org/next/”h]”j )”}”(hjþ h]”hŒ"https://rust.docs.kernel.org/next/”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jþ uh1j hjü ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K!hjø ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆ h³hÇh´K!hj‡ h²hubhÞ)”}”(hŒ0There are also tags for each main release, e.g.:”h]”hŒ0There are also tags for each main release, e.g.:”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K#hj‡ h²hubjÇ )”}”(hŒ#https://rust.docs.kernel.org/6.10/
”h]”hÞ)”}”(hŒ"https://rust.docs.kernel.org/6.10/”h]”j )”}”(hj. h]”hŒ"https://rust.docs.kernel.org/6.10/”…””}”(hj0 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j. uh1j hj, ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K%hj( ubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆ h³hÇh´K%hj‡ h²hubhÞ)”}”(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 ”…””}”(hjJ h²hh³Nh´Nubhõ)”}”(hŒ``rustdoc``”h]”hŒrustdoc”…””}”(hjR h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hôhjJ ubhŒ<
target with the same invocation used for compilation, e.g.:”…””}”(hjJ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K'hj‡ h²hubhŒ
literal_block”“”)”}”(hŒmake LLVM=1 rustdoc”h]”hŒmake LLVM=1 rustdoc”…””}”hjl sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jj h³hÇh´K-hj‡ h²hubhÞ)”}”(hŒ8To read the docs locally in your web browser, run e.g.::”h]”hŒ7To read the docs locally in your web browser, run e.g.:”…””}”(hjz h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K/hj‡ h²hubjk )”}”(hŒ