€•:»Œ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/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/zh_TW/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/it_IT/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ja_JP/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/ko_KR/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/pt_BR/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ$/translations/sp_SP/rust/quick-start”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(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³Œ>/var/lib/git/docbuild/linux/Documentation/rust/quick-start.rst”h´KubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒ Quick Start”h]”hŒ Quick Start”…”�”}”(hhÏh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhhÊh²hh³hÇh´KubhŒ paragraph”“”)�”}”(hŒKThis document describes how to get started with kernel development in Rust.”h]”hŒKThis document describes how to get started with kernel development in Rust.”…”�”}”(hhßh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hXGThere 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]”hXGThere 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.”…”�”}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(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]”(hŒKAnother way is using the prebuilt stable versions of LLVM+Rust provided on ”…”�”}”(hhûh²hh³Nh´NubhŒ reference”“”)�”}”(hŒ7`kernel.org `_”h]”hŒ kernel.org”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ kernel.org”Œrefuri”Œ'https://kernel.org/pub/tools/llvm/rust/”uh1jhhûubhŒtarget”“”)�”}”(hŒ* ”h]”h}”(h]”Œ kernel-org”ah ]”h"]”Œ kernel.org”ah$]”h&]”Œrefuri”juh1jŒ referenced”KhhûubhŒ8. These are the same slim and fast LLVM toolchains from ”…”�”}”(hhûh²hh³Nh´Nubh)�”}”(hŒ":ref:`Getting LLVM `”h]”hŒinline”“”)�”}”(hj-h]”hŒ Getting LLVM”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j/hj+ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œrust/quick-start”Œ refdomain”j<Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œ getting_llvm”uh1hh³hÇh´KhhûubhŒ³ 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).”…”�”}”(hhûh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hŒ°Alternatively, 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]”(hŒoAlternatively, the next two “Requirementsâ€� sections explain each component and how to install them through ”…”�”}”(hjZh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ ``rustup``”h]”hŒrustup”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjZubhŒ;, the standalone installers from Rust and/or building them.”…”�”}”(hjZh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÞ)�”}”(hŒFThe rest of the document explains other aspects on how to get started.”h]”hŒFThe rest of the document explains other aspects on how to get started.”…”�”}”(hj|h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KhhÊh²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Distributions”h]”hŒ Distributions”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjŠh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Arch Linux”h]”hŒ Arch Linux”…”�”}”(hjžh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj›h²hh³hÇh´KubhÞ)�”}”(hŒaArch 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¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K!hj›h²hubhŒ literal_block”“”)�”}”(hŒ$pacman -S rust rust-src rust-bindgen”h]”hŒ$pacman -S rust rust-src rust-bindgen”…”�”}”hj¼sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K$hj›h²hubeh}”(h]”Œ arch-linux”ah ]”h"]”Œ arch linux”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒDebian”h]”hŒDebian”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÒh²hh³hÇh´K(ubhÞ)�”}”(hŒ˜Debian 13 (Trixie), as well as Testing and Debian Unstable (Sid) provide recent Rust releases and thus they should generally work out of the box, e.g.::”h]”hŒ—Debian 13 (Trixie), as well as Testing and Debian Unstable (Sid) provide recent Rust releases and thus they should generally work out of the box, e.g.:”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K*hjÒh²hubj»)�”}”(hŒ6apt install rustc rust-src bindgen rustfmt rust-clippy”h]”hŒ6apt install rustc rust-src bindgen rustfmt rust-clippy”…”�”}”hjñsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K-hjÒh²hubeh}”(h]”Œdebian”ah ]”h"]”Œdebian”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´K(ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Fedora Linux”h]”hŒ Fedora Linux”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjh²hh³hÇh´K1ubhÞ)�”}”(hŒcFedora Linux provides recent Rust releases and thus it should generally work out of the box, e.g.::”h]”hŒbFedora Linux provides recent Rust releases and thus it should generally work out of the box, e.g.:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K3hjh²hubj»)�”}”(hŒ4dnf install rust rust-src bindgen-cli rustfmt clippy”h]”hŒ4dnf install rust rust-src bindgen-cli rustfmt clippy”…”�”}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K6hjh²hubeh}”(h]”Œ fedora-linux”ah ]”h"]”Œ fedora linux”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´K1ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Gentoo Linux”h]”hŒ Gentoo Linux”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj<h²hh³hÇh´K:ubhÞ)�”}”(hŒcGentoo Linux provides recent Rust releases and thus it should generally work out of the box, e.g.::”h]”hŒbGentoo Linux provides recent Rust releases and thus it should generally work out of the box, e.g.:”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K {} }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc rust-bindgen rustfmt clippy ]; RUST_LIB_SRC = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }”h]”hŒÁ{ pkgs ? import {} }: pkgs.mkShell { nativeBuildInputs = with pkgs; [ rustc rust-bindgen rustfmt clippy ]; RUST_LIB_SRC = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; }”…”�”}”hj¬sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´KJhj�h²hubeh}”(h]”Œnix”ah ]”h"]”Œnix”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´KEubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒopenSUSE”h]”hŒopenSUSE”…”�”}”(hjÅh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÂh²hh³hÇh´KRubhÞ)�”}”(hŒ�openSUSE Slowroll and openSUSE Tumbleweed provide recent Rust releases and thus they should generally work out of the box, e.g.::”h]”hŒ€openSUSE Slowroll and openSUSE Tumbleweed provide recent Rust releases and thus they should generally work out of the box, e.g.:”…”�”}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KThjÂh²hubj»)�”}”(hŒ/zypper install rust rust-src rust-bindgen clang”h]”hŒ/zypper install rust rust-src rust-bindgen clang”…”�”}”hjásbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´KWhjÂh²hubeh}”(h]”Œopensuse”ah ]”h"]”Œopensuse”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´KRubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒUbuntu”h]”hŒUbuntu”…”�”}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj÷h²hh³hÇh´K[ubhÞ)�”}”(hŒgUbuntu 26.04 LTS provides recent Rust releases and thus it should generally work out of the box, e.g.::”h]”hŒfUbuntu 26.04 LTS provides recent Rust releases and thus it should generally work out of the box, e.g.:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K]hj÷h²hubj»)�”}”(hŒ6apt install rustc rust-src bindgen rustfmt rust-clippy”h]”hŒ6apt install rustc rust-src bindgen rustfmt rust-clippy”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K`hj÷h²hubhÞ)�”}”(hŒ5In addition, ``RUST_LIB_SRC`` needs to be set, e.g.::”h]”(hŒ In addition, ”…”�”}”(hj$h²hh³Nh´Nubjc)�”}”(hŒ``RUST_LIB_SRC``”h]”hŒ RUST_LIB_SRC”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj$ubhŒ needs to be set, e.g.:”…”�”}”(hj$h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kbhj÷h²hubj»)�”}”(hŒFRUST_LIB_SRC=/usr/src/rustc-$(rustc --version | cut -d' ' -f2)/library”h]”hŒFRUST_LIB_SRC=/usr/src/rustc-$(rustc --version | cut -d' ' -f2)/library”…”�”}”hjDsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´Kdhj÷h²hubhÞ)�”}”(hŒLFor convenience, ``RUST_LIB_SRC`` can be exported to the global environment.”h]”(hŒFor convenience, ”…”�”}”(hjRh²hh³Nh´Nubjc)�”}”(hŒ``RUST_LIB_SRC``”h]”hŒ RUST_LIB_SRC”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjRubhŒ+ can be exported to the global environment.”…”�”}”(hjRh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kfhj÷h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ24.04 LTS and older”h]”hŒ24.04 LTS and older”…”�”}”(hjuh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjrh²hh³hÇh´KjubhÞ)�”}”(hŒ©Though Ubuntu 24.04 LTS and older versions still provide recent Rust releases, they require some additional configuration to be set, using the versioned packages, e.g.::”h]”hŒ¨Though Ubuntu 24.04 LTS and older versions still provide recent Rust releases, they require some additional configuration to be set, using the versioned packages, e.g.:”…”�”}”(hjƒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Klhjrh²hubj»)�”}”(hŒÛapt install rustc-1.85 rust-1.85-src bindgen-0.71 rustfmt-1.85 \ rust-1.85-clippy ln -s /usr/lib/rust-1.85/bin/rustfmt /usr/bin/rustfmt-1.85 ln -s /usr/lib/rust-1.85/bin/clippy-driver /usr/bin/clippy-driver-1.85”h]”hŒÛapt install rustc-1.85 rust-1.85-src bindgen-0.71 rustfmt-1.85 \ rust-1.85-clippy ln -s /usr/lib/rust-1.85/bin/rustfmt /usr/bin/rustfmt-1.85 ln -s /usr/lib/rust-1.85/bin/clippy-driver /usr/bin/clippy-driver-1.85”…”�”}”hj‘sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´Kphjrh²hubhÞ)�”}”(hŒiNone of these packages set their tools as defaults; therefore they should be specified explicitly, e.g.::”h]”hŒhNone of these packages set their tools as defaults; therefore they should be specified explicitly, e.g.:”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kuhjrh²hubj»)�”}”(hŒ†make LLVM=1 RUSTC=rustc-1.85 RUSTDOC=rustdoc-1.85 RUSTFMT=rustfmt-1.85 \ CLIPPY_DRIVER=clippy-driver-1.85 BINDGEN=bindgen-0.71”h]”hŒ†make LLVM=1 RUSTC=rustc-1.85 RUSTDOC=rustdoc-1.85 RUSTFMT=rustfmt-1.85 \ CLIPPY_DRIVER=clippy-driver-1.85 BINDGEN=bindgen-0.71”…”�”}”hj­sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´Kxhjrh²hubhÞ)�”}”(hŒ|Alternatively, modify the ``PATH`` variable to place the Rust 1.85 binaries first and set ``bindgen`` as the default, e.g.::”h]”(hŒAlternatively, modify the ”…”�”}”(hj»h²hh³Nh´Nubjc)�”}”(hŒ``PATH``”h]”hŒPATH”…”�”}”(hjÃh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj»ubhŒ8 variable to place the Rust 1.85 binaries first and set ”…”�”}”(hj»h²hh³Nh´Nubjc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hjÕh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj»ubhŒ as the default, e.g.:”…”�”}”(hj»h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K{hjrh²hubj»)�”}”(hŒ´PATH=/usr/lib/rust-1.85/bin:$PATH update-alternatives --install /usr/bin/bindgen bindgen \ /usr/bin/bindgen-0.71 100 update-alternatives --set bindgen /usr/bin/bindgen-0.71”h]”hŒ´PATH=/usr/lib/rust-1.85/bin:$PATH update-alternatives --install /usr/bin/bindgen bindgen \ /usr/bin/bindgen-0.71 100 update-alternatives --set bindgen /usr/bin/bindgen-0.71”…”�”}”hjísbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K~hjrh²hubhÞ)�”}”(hŒM``RUST_LIB_SRC`` may need to be set when using the versioned packages, e.g.::”h]”(jc)�”}”(hŒ``RUST_LIB_SRC``”h]”hŒ RUST_LIB_SRC”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjûubhŒ< may need to be set when using the versioned packages, e.g.:”…”�”}”(hjûh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kƒhjrh²hubj»)�”}”(hŒKRUST_LIB_SRC=/usr/src/rustc-$(rustc-1.85 --version | cut -d' ' -f2)/library”h]”hŒKRUST_LIB_SRC=/usr/src/rustc-$(rustc-1.85 --version | cut -d' ' -f2)/library”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K…hjrh²hubhÞ)�”}”(hŒLFor convenience, ``RUST_LIB_SRC`` can be exported to the global environment.”h]”(hŒFor convenience, ”…”�”}”(hj%h²hh³Nh´Nubjc)�”}”(hŒ``RUST_LIB_SRC``”h]”hŒ RUST_LIB_SRC”…”�”}”(hj-h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj%ubhŒ+ can be exported to the global environment.”…”�”}”(hj%h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‡hjrh²hubhÞ)�”}”(hŒÑIn addition, ``bindgen-0.71`` is available in newer releases (24.04 LTS), but it may not be available in older ones (20.04 LTS and 22.04 LTS), thus ``bindgen`` may need to be built manually (please see below).”h]”(hŒ In addition, ”…”�”}”(hjEh²hh³Nh´Nubjc)�”}”(hŒ``bindgen-0.71``”h]”hŒ bindgen-0.71”…”�”}”(hjMh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjEubhŒw is available in newer releases (24.04 LTS), but it may not be available in older ones (20.04 LTS and 22.04 LTS), thus ”…”�”}”(hjEh²hh³Nh´Nubjc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjEubhŒ2 may need to be built manually (please see below).”…”�”}”(hjEh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‰hjrh²hubeh}”(h]”Œ lts-and-older”ah ]”h"]”Œ24.04 lts and older”ah$]”h&]”uh1hÈhj÷h²hh³hÇh´Kjubeh}”(h]”Œubuntu”ah ]”h"]”Œubuntu”ah$]”h&]”uh1hÈhjŠh²hh³hÇh´K[ubeh}”(h]”Œ distributions”ah ]”h"]”Œ distributions”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRequirements: Building”h]”hŒRequirements: Building”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj�h²hh³hÇh´K�ubhÞ)�”}”(hŒAThis section explains how to fetch the tools needed for building.”h]”hŒAThis section explains how to fetch the tools needed for building.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K‘hj�h²hubhÞ)�”}”(hŒTTo easily check whether the requirements are met, the following target can be used::”h]”hŒSTo easily check whether the requirements are met, the following target can be used:”…”�”}”(hj®h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K“hj�h²hubj»)�”}”(hŒmake LLVM=1 rustavailable”h]”hŒmake LLVM=1 rustavailable”…”�”}”hj¼sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K–hj�h²hubhÞ)�”}”(hŒœThis triggers the same logic used by Kconfig to determine whether ``RUST_IS_AVAILABLE`` should be enabled; but it also explains why not if that is the case.”h]”(hŒBThis triggers the same logic used by Kconfig to determine whether ”…”�”}”(hjÊh²hh³Nh´Nubjc)�”}”(hŒ``RUST_IS_AVAILABLE``”h]”hŒRUST_IS_AVAILABLE”…”�”}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjÊubhŒE should be enabled; but it also explains why not if that is the case.”…”�”}”(hjÊh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K˜hj�h²hubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒrustc”h]”hŒrustc”…”�”}”(hjíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjêh²hh³hÇh´KžubhÞ)�”}”(hŒ2A recent version of the Rust compiler is required.”h]”hŒ2A recent version of the Rust compiler is required.”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K hjêh²hubhÞ)�”}”(hŒ™If ``rustup`` is being used, enter the kernel build directory (or use ``--path=`` argument to the ``set`` sub-command) and run, for instance::”h]”(hŒIf ”…”�”}”(hj h²hh³Nh´Nubjc)�”}”(hŒ ``rustup``”h]”hŒrustup”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj ubhŒ9 is being used, enter the kernel build directory (or use ”…”�”}”(hj h²hh³Nh´Nubjc)�”}”(hŒ``--path=``”h]”hŒ--path=”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj ubhŒ argument to the ”…”�”}”(hj h²hh³Nh´Nubjc)�”}”(hŒ``set``”h]”hŒset”…”�”}”(hj5h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj ubhŒ$ sub-command) and run, for instance:”…”�”}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¢hjêh²hubj»)�”}”(hŒrustup override set stable”h]”hŒrustup override set stable”…”�”}”hjMsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K¦hjêh²hubhÞ)�”}”(hŒzThis will configure your working directory to use the given version of ``rustc`` without affecting your default toolchain.”h]”(hŒGThis will configure your working directory to use the given version of ”…”�”}”(hj[h²hh³Nh´Nubjc)�”}”(hŒ ``rustc``”h]”hŒrustc”…”�”}”(hjch²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj[ubhŒ* without affecting your default toolchain.”…”�”}”(hj[h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¨hjêh²hubhÞ)�”}”(hŒZNote that the override applies to the current working directory (and its sub-directories).”h]”hŒZNote that the override applies to the current working directory (and its sub-directories).”…”�”}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K«hjêh²hubhÞ)�”}”(hŒCIf you are not using ``rustup``, fetch a standalone installer from:”h]”(hŒIf you are not using ”…”�”}”(hj‰h²hh³Nh´Nubjc)�”}”(hŒ ``rustup``”h]”hŒrustup”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj‰ubhŒ$, fetch a standalone installer from:”…”�”}”(hj‰h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K®hjêh²hubhŒ block_quote”“”)�”}”(hŒNhttps://forge.rust-lang.org/infra/other-installation-methods.html#standalone ”h]”hÞ)�”}”(hŒLhttps://forge.rust-lang.org/infra/other-installation-methods.html#standalone”h]”j)�”}”(hj±h]”hŒLhttps://forge.rust-lang.org/infra/other-installation-methods.html#standalone”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j±uh1jhj¯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²hubeh}”(h]”Œrustc”ah ]”h"]”Œrustc”ah$]”h&]”uh1hÈhj�h²hh³hÇh´KžubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒRust standard library source”h]”hŒRust standard library source”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÕh²hh³hÇh´K´ubhÞ)�”}”(hŒbThe Rust standard library source is required because the build system will cross-compile ``core``.”h]”(hŒYThe Rust standard library source is required because the build system will cross-compile ”…”�”}”(hjæh²hh³Nh´Nubjc)�”}”(hŒ``core``”h]”hŒcore”…”�”}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjæubhŒ.”…”�”}”(hjæh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¶hjÕh²hubhÞ)�”}”(hŒ"If ``rustup`` is being used, run::”h]”(hŒIf ”…”�”}”(hjh²hh³Nh´Nubjc)�”}”(hŒ ``rustup``”h]”hŒrustup”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjubhŒ is being used, run:”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K¹hjÕh²hubj»)�”}”(hŒrustup component add rust-src”h]”hŒrustup component add rust-src”…”�”}”hj&sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´K»hjÕh²hubhÞ)�”}”(hŒThe components are installed per toolchain, thus upgrading the Rust compiler version later on requires re-adding the component.”h]”hŒThe components are installed per toolchain, thus upgrading the Rust compiler version later on requires re-adding the component.”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K½hjÕh²hubhÞ)�”}”(hŒOtherwise, if a standalone installer is used, the Rust source tree may be downloaded into the toolchain's installation folder::”h]”hŒ€Otherwise, if a standalone installer is used, the Rust source tree may be downloaded into the toolchain’s installation folder:”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÀhjÕh²hubj»)�”}”(hŒúcurl -L "https://static.rust-lang.org/dist/rust-src-$(rustc --version | cut -d' ' -f2).tar.gz" | tar -xzf - -C "$(rustc --print sysroot)/lib" \ "rust-src-$(rustc --version | cut -d' ' -f2)/rust-src/lib/" \ --strip-components=3”h]”hŒúcurl -L "https://static.rust-lang.org/dist/rust-src-$(rustc --version | cut -d' ' -f2).tar.gz" | tar -xzf - -C "$(rustc --print sysroot)/lib" \ "rust-src-$(rustc --version | cut -d' ' -f2)/rust-src/lib/" \ --strip-components=3”…”�”}”hjPsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´KÃhjÕh²hubhÞ)�”}”(hŒØIn this case, upgrading the Rust compiler version later on requires manually updating the source tree (this can be done by removing ``$(rustc --print sysroot)/lib/rustlib/src/rust`` then rerunning the above command).”h]”(hŒ„In this case, upgrading the Rust compiler version later on requires manually updating the source tree (this can be done by removing ”…”�”}”(hj^h²hh³Nh´Nubjc)�”}”(hŒ1``$(rustc --print sysroot)/lib/rustlib/src/rust``”h]”hŒ-$(rustc --print sysroot)/lib/rustlib/src/rust”…”�”}”(hjfh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj^ubhŒ# then rerunning the above command).”…”�”}”(hj^h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÈhjÕh²hubeh}”(h]”Œrust-standard-library-source”ah ]”h"]”Œrust standard library source”ah$]”h&]”uh1hÈhj�h²hh³hÇh´K´ubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒlibclang”h]”hŒlibclang”…”�”}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj†h²hh³hÇh´KÎubhÞ)�”}”(hŒ´``libclang`` (part of LLVM) is used by ``bindgen`` to understand the C code in the kernel, which means LLVM needs to be installed; like when the kernel is compiled with ``LLVM=1``.”h]”(jc)�”}”(hŒ ``libclang``”h]”hŒlibclang”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj—ubhŒ (part of LLVM) is used by ”…”�”}”(hj—h²hh³Nh´Nubjc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hj­h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj—ubhŒw to understand the C code in the kernel, which means LLVM needs to be installed; like when the kernel is compiled with ”…”�”}”(hj—h²hh³Nh´Nubjc)�”}”(hŒ ``LLVM=1``”h]”hŒLLVM=1”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj—ubhŒ.”…”�”}”(hj—h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÐhj†h²hubhÞ)�”}”(hŒcLinux distributions are likely to have a suitable one available, so it is best to check that first.”h]”hŒcLinux distributions are likely to have a suitable one available, so it is best to check that first.”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÔhj†h²hubhÞ)�”}”(hŒOThere are also some binaries for several systems and architectures uploaded at:”h]”hŒOThere are also some binaries for several systems and architectures uploaded at:”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´K×hj†h²hubjª)�”}”(hŒ(https://releases.llvm.org/download.html ”h]”hÞ)�”}”(hŒ'https://releases.llvm.org/download.html”h]”j)�”}”(hjùh]”hŒ'https://releases.llvm.org/download.html”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jùuh1jhj÷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ŒNOtherwise, building LLVM takes quite a while, but it is not a complex process:”h]”hŒNOtherwise, building LLVM takes quite a while, but it is not a complex process:”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KÛhj†h²hubjª)�”}”(hŒThttps://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm ”h]”hÞ)�”}”(hŒShttps://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm”h]”j)�”}”(hj)h]”hŒShttps://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm”…”�”}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”j)uh1jhj'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Œ…Please see Documentation/kbuild/llvm.rst for more information and further ways to fetch pre-built releases and distribution packages.”h]”hŒ…Please see Documentation/kbuild/llvm.rst for more information and further ways to fetch pre-built releases and distribution packages.”…”�”}”(hjEh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kßhj†h²hubeh}”(h]”Œlibclang”ah ]”h"]”Œlibclang”ah$]”h&]”uh1hÈhj�h²hh³hÇh´KÎubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒbindgen”h]”hŒbindgen”…”�”}”(hj^h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj[h²hh³hÇh´KäubhÞ)�”}”(hŒ`The bindings to the C side of the kernel are generated at build time using the ``bindgen`` tool.”h]”(hŒOThe bindings to the C side of the kernel are generated at build time using the ”…”�”}”(hjlh²hh³Nh´Nubjc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjlubhŒ tool.”…”�”}”(hjlh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kæhj[h²hubhÞ)�”}”(hŒ]Install it, for instance, via (note that this will download and build the tool from source)::”h]”hŒ\Install it, for instance, via (note that this will download and build the tool from source):”…”�”}”(hjŒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kéhj[h²hubj»)�”}”(hŒ"cargo install --locked bindgen-cli”h]”hŒ"cargo install --locked bindgen-cli”…”�”}”hjšsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´Kìhj[h²hubhÞ)�”}”(hXâ``bindgen`` uses the ``clang-sys`` crate to find a suitable ``libclang`` (which may be linked statically, dynamically or loaded at runtime). By default, the ``cargo`` command above will produce a ``bindgen`` binary that will load ``libclang`` at runtime. If it is not found (or a different ``libclang`` than the one found should be used), the process can be tweaked, e.g. by using the ``LIBCLANG_PATH`` environment variable. For details, please see ``clang-sys``'s documentation at:”h]”(jc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hj¬h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ uses the ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``clang-sys``”h]”hŒ clang-sys”…”�”}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ crate to find a suitable ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``libclang``”h]”hŒlibclang”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒU (which may be linked statically, dynamically or loaded at runtime). By default, the ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``cargo``”h]”hŒcargo”…”�”}”(hjâh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ command above will produce a ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``bindgen``”h]”hŒbindgen”…”�”}”(hjôh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ binary that will load ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``libclang``”h]”hŒlibclang”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ0 at runtime. If it is not found (or a different ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``libclang``”h]”hŒlibclang”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒS than the one found should be used), the process can be tweaked, e.g. by using the ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ``LIBCLANG_PATH``”h]”hŒ LIBCLANG_PATH”…”�”}”(hj*h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ/ environment variable. For details, please see ”…”�”}”(hj¨h²hh³Nh´Nubjc)�”}”(hŒ ``clang-sys``”h]”hŒ clang-sys”…”�”}”(hj<h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj¨ubhŒ’s documentation at:”…”�”}”(hj¨h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´Kîhj[h²hubjª)�”}”(hŒnhttps://github.com/KyleMayes/clang-sys#linking https://github.com/KyleMayes/clang-sys#environment-variables ”h]”(hÞ)�”}”(hŒ.https://github.com/KyleMayes/clang-sys#linking”h]”j)�”}”(hjZh]”hŒ.https://github.com/KyleMayes/clang-sys#linking”…”�”}”(hj\h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jZuh1jhjXubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´KöhjTubhÞ)�”}”(hŒ`_ language server can be used with many editors to enable syntax highlighting, completion, go to definition, and other features.”h]”(hŒThe ”…”�”}”(hjà h²hh³Nh´Nubj)�”}”(hŒ3`rust-analyzer `_”h]”hŒ rust-analyzer”…”�”}”(hjË h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ rust-analyzer”jŒ https://rust-analyzer.github.io/”uh1jhjà ubj)�”}”(hŒ# ”h]”h}”(h]”Œid1”ah ]”h"]”Œ rust-analyzer”ah$]”h&]”Œrefuri”jÛ uh1jj&Khjà ubhŒ language server can be used with many editors to enable syntax highlighting, completion, go to definition, and other features.”…”�”}”(hjà h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M6hj² h²hubhÞ)�”}”(hŒ‚``rust-analyzer`` needs a configuration file, ``rust-project.json``, which can be generated by the ``rust-analyzer`` Make target::”h]”(jc)�”}”(hŒ``rust-analyzer``”h]”hŒ rust-analyzer”…”�”}”(hj÷ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjó ubhŒ needs a configuration file, ”…”�”}”(hjó h²hh³Nh´Nubjc)�”}”(hŒ``rust-project.json``”h]”hŒrust-project.json”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjó ubhŒ , which can be generated by the ”…”�”}”(hjó h²hh³Nh´Nubjc)�”}”(hŒ``rust-analyzer``”h]”hŒ rust-analyzer”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhjó ubhŒ Make target:”…”�”}”(hjó h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M:hj² h²hubj»)�”}”(hŒmake LLVM=1 rust-analyzer”h]”hŒmake LLVM=1 rust-analyzer”…”�”}”hj3 sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´M=hj² h²hubeh}”(h]”Œ rust-analyzer”ah ]”h"]”h$]”jå ah&]”uh1hÈhjžh²hh³hÇh´M4j&Kubeh}”(h]”Œrequirements-developing”ah ]”h"]”Œrequirements: developing”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´KüubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒ Configuration”h]”hŒ Configuration”…”�”}”(hjS h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjP h²hh³hÇh´MAubhÞ)�”}”(hX``Rust support`` (``CONFIG_RUST``) needs to be enabled in the ``General setup`` menu. The option is only shown if a suitable Rust toolchain is found (see above), as long as the other requirements are met. In turn, this will make visible the rest of options that depend on Rust.”h]”(jc)�”}”(hŒ``Rust support``”h]”hŒ Rust support”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhja ubhŒ (”…”�”}”(hja h²hh³Nh´Nubjc)�”}”(hŒ``CONFIG_RUST``”h]”hŒ CONFIG_RUST”…”�”}”(hjw h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhja ubhŒ) needs to be enabled in the ”…”�”}”(hja h²hh³Nh´Nubjc)�”}”(hŒ``General setup``”h]”hŒ General setup”…”�”}”(hj‰ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhja ubhŒÆ menu. The option is only shown if a suitable Rust toolchain is found (see above), as long as the other requirements are met. In turn, this will make visible the rest of options that depend on Rust.”…”�”}”(hja h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MChjP h²hubhÞ)�”}”(hŒAfterwards, go to::”h]”hŒAfterwards, go to:”…”�”}”(hj¡ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MHhjP h²hubj»)�”}”(hŒ@Kernel hacking -> Sample kernel code -> Rust samples”h]”hŒ@Kernel hacking -> Sample kernel code -> Rust samples”…”�”}”hj¯ sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´MJhjP h²hubhÞ)�”}”(hŒAAnd enable some sample modules either as built-in or as loadable.”h]”hŒAAnd enable some sample modules either as built-in or as loadable.”…”�”}”(hj½ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MNhjP h²hubeh}”(h]”Œ configuration”ah ]”h"]”Œ configuration”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MAubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒBuilding”h]”hŒBuilding”…”�”}”(hjÖ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhjÓ h²hh³hÇh´MRubhÞ)�”}”(hŒeBuilding a kernel with a complete LLVM toolchain is the best supported setup at the moment. That is::”h]”hŒdBuilding a kernel with a complete LLVM toolchain is the best supported setup at the moment. That is:”…”�”}”(hjä h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MThjÓ h²hubj»)�”}”(hŒ make LLVM=1”h]”hŒ make LLVM=1”…”�”}”hjò sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jºh³hÇh´MWhjÓ h²hubhÞ)�”}”(hŒXUsing GCC also works for some configurations, but it is very experimental at the moment.”h]”hŒXUsing GCC also works for some configurations, but it is very experimental at the moment.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´MYhjÓ h²hubeh}”(h]”Œbuilding”ah ]”h"]”Œbuilding”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´MRubhÉ)�”}”(hhh]”(hÎ)�”}”(hŒHacking”h]”hŒHacking”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÍhj h²hh³hÇh´M^ubhÞ)�”}”(hŒ±To dive deeper, take a look at the source code of the samples at ``samples/rust/``, the Rust support code under ``rust/`` and the ``Rust hacking`` menu under ``Kernel hacking``.”h]”(hŒATo dive deeper, take a look at the source code of the samples at ”…”�”}”(hj' h²hh³Nh´Nubjc)�”}”(hŒ``samples/rust/``”h]”hŒ samples/rust/”…”�”}”(hj/ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj' ubhŒ, the Rust support code under ”…”�”}”(hj' h²hh³Nh´Nubjc)�”}”(hŒ ``rust/``”h]”hŒrust/”…”�”}”(hjA h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj' ubhŒ and the ”…”�”}”(hj' h²hh³Nh´Nubjc)�”}”(hŒ``Rust hacking``”h]”hŒ Rust hacking”…”�”}”(hjS h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj' ubhŒ menu under ”…”�”}”(hj' h²hh³Nh´Nubjc)�”}”(hŒ``Kernel hacking``”h]”hŒKernel hacking”…”�”}”(hje h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jbhj' ubhŒ.”…”�”}”(hj' h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÝh³hÇh´M`hj h²hubeh}”(h]”Œhacking”ah ]”h"]”Œhacking”ah$]”h&]”uh1hÈhhÊh²hh³hÇh´M^ubeh}”(h]”Œ quick-start”ah ]”h"]”Œ quick start”ah$]”h&]”uh1hÈhhh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)�”}”(hÍNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j° Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jŠ j‡ j"jjŒj‰jÏjÌjjj9j6jŠj‡j¿j¼jôjñj„j�j|jyj›j˜jÒjÏjƒj€jXjUj“j�jM jJ jS jP j j j¯ j¬ Œ rust-analyzer”jâ jÐ jÍ j j j‚ j uŒ nametypes”}”(jŠ ‰j"ˆjŒ‰jωj‰j9‰jЉj¿‰jô‰j„‰j|‰j›‰jÒ‰jƒ‰jX‰j“‰jM ‰jS ‰j ‰j¯ ‰jô ˆjÐ ‰j ‰j‚ ‰uh}”(j‡ hÊjjj‰jŠjÌj›jjÒj6jj‡j<j¼j�jñjÂj�j÷jyjrj˜j�jÏjêj€jÕjUj†j�j[jJ jžjP j½j jV j¬ j jC j² jâ jÜ jÍ jP j jÓ j j uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”j¾ Ks…”R”Œparse_messages”]”hŒsystem_message”“”)�”}”(hhh]”hÞ)�”}”(hŒ0Duplicate implicit target name: "rust-analyzer".”h]”hŒ4Duplicate implicit target name: “rust-analyzerâ€�.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÝhj ubah}”(h]”h ]”h"]”h$]”h&]”jâ aŒlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1j hj² h²hh³hÇh´M8ubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.