From nobody Sun Feb 8 18:31:46 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79FB9C001DF for ; Thu, 3 Aug 2023 06:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233008AbjHCGXV (ORCPT ); Thu, 3 Aug 2023 02:23:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232083AbjHCGXS (ORCPT ); Thu, 3 Aug 2023 02:23:18 -0400 X-Greylist: delayed 726 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 02 Aug 2023 23:23:16 PDT Received: from suitable-modron.relay-egress.a.mail.umich.edu (relay-egress-host.us-east-2.a.mail.umich.edu [18.219.209.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83E331706; Wed, 2 Aug 2023 23:23:16 -0700 (PDT) Received: from commutual-kasha.authn-relay.a.mail.umich.edu (ip-10-0-74-76.us-east-2.compute.internal [10.0.74.76]) by suitable-modron.relay-egress.a.mail.umich.edu with ESMTPS id 64CB43C7.22C5C780.6C770CBF.1872949; Thu, 03 Aug 2023 02:05:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2018-08-29; t=1691042753; bh=IMCiJAtHEYq1/G5fIOJlIPrjUVMkIOOLBM9xNgMNLgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=MmuoDNxRglAARpbYMSq8UWyq4ft+jo9FPct9PQcFSqmKndC5ZsZxJTb59bwdKYTeR mA+n4q+n7MrJ4uEyxua6CgLklf9aTAVtGmT8B6PMjkFQ5T0JLDlb8PpTXlk25QR5l5 xgsK3x9i1naMGGeyfvhG1+EW02cjKyk89rDreFHUi+Uh7PCvQAjIq4gbpNSy5/MnNG 0vwrJD1EZW7uP6/d5SMBBFWiwgFvRG1wcrbc5dmt+aIgoxVfSWiTjUDd3qsV2sWmGv eurIfmcbhiNrFBAsjoRUjqwhhGUTqeKr9vM/7U/MTY8vh7ZeCHhp4fVRHFxRJkrHIM xS1LxK9cc1yZQ== Authentication-Results: commutual-kasha.authn-relay.a.mail.umich.edu; iprev=permerror policy.iprev=68.32.216.219 (unknown); auth=pass smtp.auth=tmgross Received: from localhost.localdomain (unknown [68.32.216.219]) by commutual-kasha.authn-relay.a.mail.umich.edu with ESMTPSA id 64CB43C1.8906381.44ABE1D6.2496870; Thu, 03 Aug 2023 02:05:53 -0400 From: Trevor Gross To: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com Cc: boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, corbet@lwn.net, yakoyoku@gmail.com, aliceryhl@google.com, tmgross@umich.edu, linux-doc@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] docs: rust: update instructions for obtaining 'core' source Date: Thu, 3 Aug 2023 02:04:36 -0400 Message-Id: <20230803060437.12157-2-tmgross@umich.edu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230803060437.12157-1-tmgross@umich.edu> References: <20230803060437.12157-1-tmgross@umich.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The source for Rust's 'core' library is needed to build the kernel with Rust support. This sometimes needs to be obtained by hand when using a standalone version of 'rustc' not managed by 'rustup'. Currently, the documentation suggests cloning the 'rust' repository to obtain these sources, but this is quite slow (on the order of a multiple minutes). Change this documentation to suggest using the source tarball instead. The tarball includes only needed files (<5M) and is significantly faster to download; this is more in line with what 'rustup' does. Also simplify wording of the relevant section. Link: https://github.com/Rust-for-Linux/linux/pull/1024 Signed-off-by: Trevor Gross Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl --- Documentation/rust/quick-start.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-= start.rst index a8931512ed98..632b115dd20d 100644 --- a/Documentation/rust/quick-start.rst +++ b/Documentation/rust/quick-start.rst @@ -56,16 +56,17 @@ If ``rustup`` is being used, run:: The components are installed per toolchain, thus upgrading the Rust compil= er version later on requires re-adding the component. =20 -Otherwise, if a standalone installer is used, the Rust repository may be c= loned -into the installation folder of the toolchain:: +Otherwise, if a standalone installer is used, the Rust source tree may be +downloaded into the toolchain's installation folder:: =20 - git clone --recurse-submodules \ - --branch $(scripts/min-tool-version.sh rustc) \ - https://github.com/rust-lang/rust \ - $(rustc --print sysroot)/lib/rustlib/src/rust + curl -L "https://static.rust-lang.org/dist/rust-src-$(scripts/min-tool-ve= rsion.sh rustc).tar.gz" | + tar -xzf - -C "$(rustc --print sysroot)/lib" \ + "rust-src-$(scripts/min-tool-version.sh rustc)/rust-src/lib/" \ + --strip-components=3D3 =20 In this case, upgrading the Rust compiler version later on requires manual= ly -updating this clone. +updating the source tree (this can be done by removing ``$(rustc --print +sysroot)/lib/rustlib/src/rust`` then rerunning the above command). =20 =20 libclang --=20 2.34.1 From nobody Sun Feb 8 18:31:46 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6202C001DF for ; Thu, 3 Aug 2023 06:23:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233051AbjHCGX0 (ORCPT ); Thu, 3 Aug 2023 02:23:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232987AbjHCGXT (ORCPT ); Thu, 3 Aug 2023 02:23:19 -0400 Received: from suitable-modron.relay-egress.a.mail.umich.edu (relay-egress-host.us-east-2.a.mail.umich.edu [18.219.209.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56DD110FB; Wed, 2 Aug 2023 23:23:18 -0700 (PDT) Received: from commutual-kasha.authn-relay.a.mail.umich.edu (ip-10-0-74-76.us-east-2.compute.internal [10.0.74.76]) by suitable-modron.relay-egress.a.mail.umich.edu with ESMTPS id 64CB43C7.259FD9A9.11B72FB0.1872949; Thu, 03 Aug 2023 02:05:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umich.edu; s=relay-2018-08-29; t=1691042758; bh=5mhAm6jPr/dCTY1x65fzBu3cjprRxi0dMZQP4F4Gdnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F4RkUMbHqeRV0+qBRUfrjUn4YYQDLXNfl2anDyGZTgPxCfup1W+MEisRJqPV/DgrS 2ciASMFfSQeJZCXGiEpC3vlhS6dkBYId10wcN4Ll8aiYm3ZocNx6cdNPf3yDmd3Tfp +HBtPl33TNsDN/ewQ4f55j0gEBwdpyq8strJ/K8UeG8t/OTx9IxeOjTYyjSnC/2nAi 9tbrAXnsBD0Lpbv/RiecO8hvIJ4MDcGLYbU8EJHG6FvyqNH0OGo6ptyvjZkg5ezBeA uGaZdE/42z8/SFNObCWmBsR8aDMVOR5Wve9vRuzTKUSvN2JjtJRwTyiOIhHCX/8oc+ 2Oy2UOFZ/E05g== Authentication-Results: commutual-kasha.authn-relay.a.mail.umich.edu; iprev=permerror policy.iprev=68.32.216.219 (unknown); auth=pass smtp.auth=tmgross Received: from localhost.localdomain (unknown [68.32.216.219]) by commutual-kasha.authn-relay.a.mail.umich.edu with ESMTPSA id 64CB43C6.27F6E04.7CEFCF81.2496870; Thu, 03 Aug 2023 02:05:58 -0400 From: Trevor Gross To: ojeda@kernel.org, alex.gaynor@gmail.com, wedsonaf@gmail.com Cc: boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com, benno.lossin@proton.me, corbet@lwn.net, yakoyoku@gmail.com, aliceryhl@google.com, tmgross@umich.edu, linux-doc@vger.kernel.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/2] docs: rust: clarify what 'rustup override' does Date: Thu, 3 Aug 2023 02:04:37 -0400 Message-Id: <20230803060437.12157-3-tmgross@umich.edu> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230803060437.12157-1-tmgross@umich.edu> References: <20230803060437.12157-1-tmgross@umich.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The behavior of 'rustup override' is not very well known. Add a small note about what it does, so users have a better understanding of how it affects their system toolchain (i.e., it does not affect system toolchain and only sets a directory-specific override). Signed-off-by: Trevor Gross Reviewed-by: Martin Rodriguez Reboredo Reviewed-by: Alice Ryhl --- Documentation/rust/quick-start.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-= start.rst index 632b115dd20d..0612ea517bc1 100644 --- a/Documentation/rust/quick-start.rst +++ b/Documentation/rust/quick-start.rst @@ -38,7 +38,9 @@ and run:: =20 rustup override set $(scripts/min-tool-version.sh rustc) =20 -Otherwise, fetch a standalone installer from: +This will configure your working directory to use the correct version of +``rustc`` without affecting your default toolchain. If you are not using +``rustup``, fetch a standalone installer from:: =20 https://forge.rust-lang.org/infra/other-installation-methods.html#standal= one =20 --=20 2.34.1