Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp361278pxb; Wed, 14 Apr 2021 17:51:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz171MiVdaviRbMHKnoCSVjzZXHyMFm56joWx7+hgagFR3mw+SQEipgKkoL+efcNUJ0efcm X-Received: by 2002:a05:6402:34cd:: with SMTP id w13mr1033565edc.73.1618447892623; Wed, 14 Apr 2021 17:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447892; cv=none; d=google.com; s=arc-20160816; b=IZXZlji+2E97QMV0scZRperpfp6LXOpid56JmpseeiBGsOs6SypdnMUJbOJGjGRyqh FuSeBaWdmYl+5g30iHFqlvrmVkiZ2aVD4Wh94cfu0gX+KU/mvB1W5Hjia8bKnQmTdGK1 iSck9v2V5tIjOMDPdPpf+YaRsld3UUMr7snHkgRsgxK2hafFJbQoDjoZJEeSzf/Jm0Dy D/6y/34WLWMbX+THiCJSO+OXfd+SIqHtgTsRP904h891aF2dIdn/XC1sD0VTC16OoxW7 CN7eQmI+qJD/fcSD16FHEOul4obk7H+1IlacCBvs+a2CcqiHIfVFp+oxmi4sCE5H9PHa GZKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lpeq08hz5AFe13tA1HBxBv4F7DKthixhqDeaeuhPzqo=; b=1H5ZNh+lABWLmlRJZ8QCsRYNCehBjdwrjmXfibLUhqDsDPvzosubtB3jHvJ36tatCp GQrbq9TcBajS3DQNOrdKTgnvpF5wySYYOujhrmJAoAcxlLopNk9pco9qUsT/OiPK+U/O 2MVI8n2G7qGlenLOzLn6p6S8amm4BEd64RCTQXfv1i0UwvgOD4KX59X1LfhHkC7ZBxBO d/+iL2BBgr2sQLcziiWUiGpeXBbkhs9SKcJD9dWelyKtcouRZM2vj+/4WMLTtkvS9Tfy UxzutG8XbuSONmSYx/uLJ18myGVOUEaELzv+Pn1q4x1nAnYMeIqfnWwhEpi4j/zdMN0X aBWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RcHvTa4X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp20si783312ejb.524.2021.04.14.17.51.09; Wed, 14 Apr 2021 17:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RcHvTa4X; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233453AbhDNXfC (ORCPT + 99 others); Wed, 14 Apr 2021 19:35:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232631AbhDNXe6 (ORCPT ); Wed, 14 Apr 2021 19:34:58 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCE87C061574; Wed, 14 Apr 2021 16:34:36 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id c195so24049883ybf.9; Wed, 14 Apr 2021 16:34:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lpeq08hz5AFe13tA1HBxBv4F7DKthixhqDeaeuhPzqo=; b=RcHvTa4XIaTS5N3Ex/HbpYPVaN49e6k0T/y6QkMMmft+ABpIRAQFqBI9Ei7CfR9p7T MB7pGJpymxr/LQU1zO2DqR7roeV/JxnaE1li2O1JBq+MhzOkT/d5ip20USlS2pDr7RQZ fld2zhJ9XMf82hzNQP2VH3lg91STNXxcmTvrtDhfmW1p1v9/PFI4e5AeKem2JpJAZxeX gr4tauGFJ521zWOciWLgPhbIMZKdbMz0tsf15JduAeoQDKaTv6DQFnZ0gRizwcJ6bYPJ rxqnwc8Z434lKKgXVQ6mzlf2RFUx+FSNqOdvAR3mXEGustVigR7bMmsMdVUcsMH9yf37 LMYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lpeq08hz5AFe13tA1HBxBv4F7DKthixhqDeaeuhPzqo=; b=ullXS0NLTM3XrRJSkbFLPgoJdrpeStK1YD1Z+GhFgGHnVjaPoTVkhzETNFFPz8sMH0 4XvtfzizH9utE6RPdCXB1DejHO5P7jGIke5gXo3BXKKdlB8XI0kbDcB5WiGmIeBXivk3 DorXU7bZUs5XnDliHW8lyrK5mcsCNqT5Rye1ODUsv1tRLIE0oUGophI0iFH25XU9AkK6 Sfd1NB7MCHgLdKqN0VR1gVlqHZKQWPG61WVI2bMEQ1BDX1DRP/11ZB7NeGG6iMBSyPS0 kfosmJU3WglkQduOLlDCt8XgtM2dqmVxzFvQXug5QWog1ZAMdd7VIcL5sAf9fHgq8/mN xb5Q== X-Gm-Message-State: AOAM532grkvcIilU7GyC5SdJfu3DGoUVql6vb+eywm0MhaWf76AYaX3d /wd+Ph+j6FFCZ4+KlR1mYfGk4yPnlR6Mla/qlwU= X-Received: by 2002:a25:81ce:: with SMTP id n14mr568991ybm.33.1618443275959; Wed, 14 Apr 2021 16:34:35 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <20210414184604.23473-11-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Thu, 15 Apr 2021 01:34:25 +0200 Message-ID: Subject: Re: [PATCH 10/13] Documentation: Rust general information To: Nick Desaulniers Cc: Miguel Ojeda , Linus Torvalds , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , Linux Doc Mailing List , LKML , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Nick, Thanks a lot for looking into this! On Thu, Apr 15, 2021 at 12:18 AM Nick Desaulniers wrote: > > Was this TODO meant to be removed, or is it still pending? If pending, > on what? Being able to link back on itself if/once merged? Still pending -- the plan is to upload the docs to kernel.org rather than have them on GitHub, and ideally have one version done from the CI automatically on e.g. every merge, but that requires some sorting out. But yeah, I could have put here the link to the temporary docs in GitHub for the moment, good catch! +1 > Consider if the docs need any change here based on behavior related to > Panics based on feedback thus far in the thread. Indeed, it should be a very rare occurrence. I will add a sentence saying that one needs to be really sure there is no other way out than panicking. I have to write a few more bits regarding some new guidelines we follow/enforce. > That link has a comment that this was fixed. Is the comment now stale? There were a couple things to resolve regarding LLVM 12 last time I looked into it, so I didn't update it (also, it is safer in general to use the recommended nightly -- one never knows when things may break, plus some nightlies do not include all the tools like `rustfmt`). So my current plan is to recommend a given nightly, and update it only when needed, in tandem with the CI builds (we also test different/newer nightlies in the CI when possible, e.g. when the LLVM 12 bits are resolved, then we will also test one with LLVM 12). > Perhaps worth another cross reference to :ref:`kbuild_llvm`? > https://www.kernel.org/doc/html/latest/kbuild/llvm.html#getting-llvm > Perhaps amend that then link to it from here? +1 > Avoid terms like recent and modern. Otherwise in a few years 0.56.0 > will be archaic, not recent, and you'll need to update your docs. So +1 > bindgen does not distribute libclang? AFAIK, no, `bindgen` expects you to provide/install `libclang` (and you have some knobs to control how it searches for it). But it looks like they also allow to link it statically. I was looking into this a while ago to upload a static version to kernel.org somewhere (actually, a full Clang/LLVM and the rest of tools for Rust support), so that kernel developers had an easier time setting things up. Konstantin Ryabitsev told me it would be possible, but we need to sort out a few details. > Please reorder; prefer LLVM=1 to CC=clang. Probably worth another > cross reference to :ref:`kbuild_llvm`. Will do! > "new" as in changed, or "new" as in Rust previously did not mangle symbols? Changed -- currently (in stable) they use what they call the `legacy` mangling scheme, which is very similar to C++'s (and used the same prefix, `_Z`). Cheers, Miguel