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/quick-startmodnameN classnameNrefexplicitutagnamehhhubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/zh_TW/rust/quick-startmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/it_IT/rust/quick-startmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ja_JP/rust/quick-startmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/ko_KR/rust/quick-startmodnameN classnameNrefexplicituh1hhhubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget$/translations/sp_SP/rust/quick-startmodnameN 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:spacepreserveuh1hhhhhh>/var/lib/git/docbuild/linux/Documentation/rust/quick-start.rsthKubhsection)}(hhh](htitle)}(hQuick Starth]hQuick Start}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hKThis document describes how to get started with kernel development in Rust.h]hKThis document describes how to get started with kernel development in Rust.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXG There are a few ways to install a Rust toolchain needed for kernel development.
A simple way is to use the packages from your Linux distribution if they are
suitable -- the first section below explains this approach. An advantage of this
approach is that, typically, the distribution will match the LLVM used by Rust
and Clang.h]hXG There are a few ways to install a Rust toolchain needed for kernel development.
A simple way is to use the packages from your Linux distribution if they are
suitable -- the first section below explains this approach. An advantage of this
approach is that, typically, the distribution will match the LLVM used by Rust
and Clang.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX Another way is using the prebuilt stable versions of LLVM+Rust provided on
`kernel.org `_. These are the same slim
and fast LLVM toolchains from :ref:`Getting LLVM ` with versions
of Rust added to them that Rust for Linux supports. Two sets are provided: the
"latest LLVM" and "matching LLVM" (please see the link for more information).h](hKAnother way is using the prebuilt stable versions of LLVM+Rust provided on
}(hhhhhNhNubh reference)}(h7`kernel.org `_h]h
kernel.org}(hhhhhNhNubah}(h]h ]h"]h$]h&]name
kernel.orgrefuri'https://kernel.org/pub/tools/llvm/rust/uh1hhhubhtarget)}(h* h]h}(h]
kernel-orgah ]h"]
kernel.orgah$]h&]refurij uh1j
referencedKhhubh8. These are the same slim
and fast LLVM toolchains from }(hhhhhNhNubh)}(h":ref:`Getting LLVM `h]hinline)}(hj h]hGetting LLVM}(hj hhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j hj ubah}(h]h ]h"]h$]h&]refdocrust/quick-start refdomainj( reftyperefrefexplicitrefwarn reftargetgetting_llvmuh1hhhhKhhubh with versions
of Rust added to them that Rust for Linux supports. Two sets are provided: the
“latest LLVM” and “matching LLVM” (please see the link for more information).}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hAlternatively, the next two "Requirements" sections explain each component and
how to install them through ``rustup``, the standalone installers from Rust
and/or building them.h](hoAlternatively, the next two “Requirements” sections explain each component and
how to install them through }(hjF hhhNhNubhliteral)}(h
``rustup``h]hrustup}(hjP hhhNhNubah}(h]h ]h"]h$]h&]uh1jN hjF ubh;, the standalone installers from Rust
and/or building them.}(hjF hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hFThe rest of the document explains other aspects on how to get started.h]hFThe rest of the document explains other aspects on how to get started.}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(h
Distributionsh]h
Distributions}(hjy hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjv hhhhhKubh)}(hhh](h)}(h
Arch Linuxh]h
Arch Linux}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(haArch Linux provides recent Rust releases and thus it should generally work out
of the box, e.g.::h]h`Arch Linux provides recent Rust releases and thus it should generally work out
of the box, e.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hj hhubh
literal_block)}(h$pacman -S rust rust-src rust-bindgenh]h$pacman -S rust rust-src rust-bindgen}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhK$hj hhubeh}(h]
arch-linuxah ]h"]
arch linuxah$]h&]uh1hhjv hhhhhKubh)}(hhh](h)}(hDebianh]hDebian}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK(ubh)}(hDebian Testing and Debian Unstable (Sid), outside of the freeze period, provide
recent Rust releases and thus they should generally work out of the box, e.g.::h]hDebian Testing and Debian Unstable (Sid), outside of the freeze period, provide
recent Rust releases and thus they should generally work out of the box, e.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj hhubj )}(h6apt install rustc rust-src bindgen rustfmt rust-clippyh]h6apt install rustc rust-src bindgen rustfmt rust-clippy}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhK-hj hhubeh}(h]debianah ]h"]debianah$]h&]uh1hhjv hhhhhK(ubh)}(hhh](h)}(hFedora Linuxh]hFedora Linux}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhK1ubh)}(hcFedora Linux provides recent Rust releases and thus it should generally work out
of the box, e.g.::h]hbFedora Linux provides recent Rust releases and thus it should generally work out
of the box, e.g.:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj hhubj )}(h4dnf install rust rust-src bindgen-cli rustfmt clippyh]h4dnf install rust rust-src bindgen-cli rustfmt clippy}hj sbah}(h]h ]h"]h$]h&]hhuh1j hhhK6hj hhubeh}(h]fedora-linuxah ]h"]fedora linuxah$]h&]uh1hhjv hhhhhK1ubh)}(hhh](h)}(hGentoo Linuxh]hGentoo Linux}(hj+ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj( hhhhhK:ubh)}(hGentoo Linux (and especially the testing branch) provides recent Rust releases
and thus it should generally work out of the box, e.g.::h]hGentoo Linux (and especially the testing branch) provides recent Rust releases
and thus it should generally work out of the box, e.g.:}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK