From patchwork Tue Dec 12 07:43:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 177116 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6359:4293:b0:170:897c:21ad with SMTP id kp19csp2919437rwb; Mon, 11 Dec 2023 23:44:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IHpGy2X300MvrZKcDgE/bjOBXPKCv7dP21pnlF1ZiFVTAQPWS5AoxucWdglIoR9gyf/OaQ2 X-Received: by 2002:a05:6e02:12c6:b0:35a:fad3:2b2a with SMTP id i6-20020a056e0212c600b0035afad32b2amr8892128ilm.12.1702367048215; Mon, 11 Dec 2023 23:44:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702367048; cv=none; d=google.com; s=arc-20160816; b=RkrEgWu7QNoDGEy1Y47UTQHZQ3iba4HsRnWKs4+RVRJDtQCJksl4L+7Xy6Ao4OukUi 2CYUjRldawZVshYIPReuP4rzqbnSLDEvBROcQZYA6rMIthhXVB/dr68CgPlDJv0U1rZl v0WvqZsPWklI+vpnwzER5E2/5CBaiIuDyHv+Pi5uapjuKBks3umAWpNa+nPOg06yWBzc VmS/UegXvNIAFRVew2802Sm+SfnnymQnETG7drMPKQbOvZJN0XrYXVnrFfDWURWENKeS NjOdcborsp2cGMEbdANzM8WvORh3Vlrfx74/ivazMISQxUKL+/SpSa4aCPCRTdhmnqvR HAvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=TOXKU7bsGbNdHwHYKjDdosOGqerCEfbXvQrWb4UvRVA=; fh=AWheenlwQKwAPagYmVafMJBzzjN+Z5vXHGrn/fU/DOg=; b=ZpTG7X/QleZiEkHU94rlKGnzC+L0Kfnieut+JgY+/PkU+95Dzk1b2rXutjU7cW5s3e vd9H+pP+8KGdnXBZpnVlmiuaSSVM+Ofsjnoep5V5Qx97MIDjA4366lEFZW3sL/JlLoW0 pmB983NRnchkld2/l1sMWxi4ehURupWolUoK4MChfpxeej12oRr9AVXOUCIifVQnLcci zG+geWbUethEFY6V/N+o1vuYokhhL3pURzyk7b9s+jnOO5SlP2bv31HoW+Cgz4IdXx4z M4jXuv95X5cVR4WJag+qHrhltYsCJBuJMSl7YGDjg3MDTQ9KiqryNLZCimcjxQnt2emv Tz+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LSo5XZFI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id w17-20020a170902e89100b001cfb1dae607si7406012plg.146.2023.12.11.23.44.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 23:44:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LSo5XZFI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A3E8A809B9CC; Mon, 11 Dec 2023 23:44:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231210AbjLLHnw (ORCPT + 99 others); Tue, 12 Dec 2023 02:43:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230473AbjLLHnv (ORCPT ); Tue, 12 Dec 2023 02:43:51 -0500 Received: from mail-ot1-x331.google.com (mail-ot1-x331.google.com [IPv6:2607:f8b0:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16D4CC2 for ; Mon, 11 Dec 2023 23:43:57 -0800 (PST) Received: by mail-ot1-x331.google.com with SMTP id 46e09a7af769-6d9f9fbfd11so2250088a34.2 for ; Mon, 11 Dec 2023 23:43:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702367036; x=1702971836; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TOXKU7bsGbNdHwHYKjDdosOGqerCEfbXvQrWb4UvRVA=; b=LSo5XZFIc/VUGHNlD/o56Rk2QJkMRRxPmj/6S+vhtduOpSWVmESkYQ4SxUJ442BijS aSuqHfvmvWekqgxUN1RxOntxyQNV7MHgOUx5AVlyu8VmbtlvtxkGNscRUmymye7DG7lu G86q3j5QMnwUbO9MV7I1EnHQS5IHFOn3Iv63bw5Q8NC03KpdUZEZrUKDJkyyZoD6F0K5 S5Q1q8D93f0tCHC9EJbcwqOuilkiDujcQFsrelaGsfG0QkaA7GvSRpUu1Fp6jjfhIehN onRKLZ3gWOEJ2kDEIz+56bTUzkHnziQlx5EI7IXQA4zsdlhw9zjK3eAvexXyjTVme+Wm w+eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702367036; x=1702971836; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TOXKU7bsGbNdHwHYKjDdosOGqerCEfbXvQrWb4UvRVA=; b=J+gH1me8BjmvAzy7wTEz7ZxRtJfO2JxhvW6VMwr8E1UmJSW07kF7eFpz75frmTZJNi Fb5qf5XuyRstXo8YjbHqyhcHN+20FA3Pudbogn7+d10qePPb6bXTUChOPfG40xlPy8bt HMXU/ltEGbjg3IfgfSbdL/ag2TB7PLXVPPJ0jUIaPEjsqrhcurB8ciop0RUS0cG9aEZy EmYQy2IsGHbauE39CV0IkVZ3ITRr7MDQmTi8rNbTikGbdcjqMXBv1merr+JEimcDKDaL kSmSJjXWJpJHQk0ktUDyUptZZq9dqCv/N9mQu/F+J/r3b+B8IV9FuFdse+DR1OczOn4j wsaQ== X-Gm-Message-State: AOJu0YwmA/0UxC7QYke73GZs1VztTe619AAQ72slVyZQzfiRgXq4QsKa pfKLUoBsVZpi7A85ru0mqNOBWA== X-Received: by 2002:a05:6830:615:b0:6d9:f334:f886 with SMTP id w21-20020a056830061500b006d9f334f886mr5749871oti.18.1702367036432; Mon, 11 Dec 2023 23:43:56 -0800 (PST) Received: from localhost ([122.172.82.6]) by smtp.gmail.com with ESMTPSA id d12-20020a056a0010cc00b006ce61c9495fsm7470500pfu.206.2023.12.11.23.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 23:43:55 -0800 (PST) From: Viresh Kumar To: Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Jonathan Corbet Cc: Viresh Kumar , Vincent Guittot , rust-for-linux@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2] docs: rust: Clarify that 'rustup override' applies to build directory Date: Tue, 12 Dec 2023 13:13:48 +0530 Message-Id: X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 MIME-Version: 1.0 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 11 Dec 2023 23:44:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785061229473127537 X-GMAIL-MSGID: 1785061229473127537 Rustup override is required to be set for the build directory and not necessarily the kernel source tree (unless the build directory is its subdir). Clarify the same in quick-start guide. Signed-off-by: Viresh Kumar Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin --- V2: - Made few changes based on review comments. Documentation/rust/quick-start.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst index f382914f4191..7ea931f74e09 100644 --- a/Documentation/rust/quick-start.rst +++ b/Documentation/rust/quick-start.rst @@ -33,14 +33,18 @@ A particular version of the Rust compiler is required. Newer versions may or may not work because, for the moment, the kernel depends on some unstable Rust features. -If ``rustup`` is being used, enter the checked out source code directory -and run:: +If ``rustup`` is being used, enter the kernel build directory (or use +`--path=` argument to the `set` sub-command) and run:: rustup override set $(scripts/min-tool-version.sh rustc) 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: +``rustc`` without affecting your default toolchain. + +Note that the override applies to the current working directory (and its +sub-directories). + +If you are not using ``rustup``, fetch a standalone installer from: https://forge.rust-lang.org/infra/other-installation-methods.html#standalone