Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp274415ybt; Thu, 9 Jul 2020 22:37:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyB7INwg6jnTI0Uco7JY3xzKwUWbgzEVI0bDlxZqq3v+uvJtkQrF37R1Q04sF4xIT7XqZ9a X-Received: by 2002:a17:906:5909:: with SMTP id h9mr58422943ejq.501.1594359450297; Thu, 09 Jul 2020 22:37:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594359450; cv=none; d=google.com; s=arc-20160816; b=BiGRhbsmsED1c/vOlyAj2RUD5MnRuL/H7LuJCgt2tnPv4u7Qr5xRSHmzD1KD0CxfyK JtZwxQD6VGdVTCv/vaYdjRA78Iv5EsaDj2J9ytcV57LE4111RGvF5kHnui1O8ErXEoQ0 eWJcpcYrNX8hQL+Y+5okLAl+kWRnN7v1Ss+oUNEhBrkX977K1ZV/lYDNzI/NIPyDGYlH yT6oE4NS8INdt2dLKEp+z//ITvHGHwC1G7IbOltQUmOqSC2Tj7ETMQsKPIWVzdRKxQpL /zc8/fg1ocF0mgIquPRBrYKueynzJ7i7i4/1CdHaMUyzCX1KJBUGwGZCz7LgkjG2J4AV uGig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=6A9Whrldh+ioY+P9HWTU177mm3KlgoTA8jzTfBSCErc=; b=iag3uVqsonOSQB2X4mw7yQy5dKbxHNFkioAxw2JEng+Fn9VZXNp9zVZ3QHqEZJ3CCg bAMk1kHWbtajhthc/x49Jli0zpge5dYhJtmKEOguLsd50ce5Ltl4N0ujS6QxSTeqvsqY 8LWz16RIdRaDDd6nwRk4XbFfijx+VXjqZYB2xgv1+aB0S82ysQ9DBoe88rTnJYCtDvqy Q60PqxLDMkvsvM0+sPKgCh91TQ3UvRNAx+faPrgrs4XGnYnhb2JQNaEaJEu/M6CevekK 5BNc75gbMKHRPdzpmsxAUc3KECGGAUNPj06IwpjnH+W5iFuxSv86W6Cyn37Pj46vkhxd HZYA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si3474528edv.525.2020.07.09.22.37.06; Thu, 09 Jul 2020 22:37:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726461AbgGJFg4 (ORCPT + 99 others); Fri, 10 Jul 2020 01:36:56 -0400 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:59423 "EHLO relay9-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725851AbgGJFg4 (ORCPT ); Fri, 10 Jul 2020 01:36:56 -0400 X-Originating-IP: 50.39.163.217 Received: from localhost (50-39-163-217.bvtn.or.frontiernet.net [50.39.163.217]) (Authenticated sender: josh@joshtriplett.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 44079FF803; Fri, 10 Jul 2020 05:36:44 +0000 (UTC) Date: Thu, 9 Jul 2020 22:36:42 -0700 From: Josh Triplett To: Nick Desaulniers Cc: alex.gaynor@gmail.com, geofft@ldpreload.com, jbaublitz@redhat.com, Masahiro Yamada , Linus Torvalds , Greg KH , Miguel Ojeda , Steven Rostedt , LKML , clang-built-linux Subject: Re: Linux kernel in-tree Rust support Message-ID: <20200710053642.GA7282@localhost> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 09, 2020 at 11:41:47AM -0700, Nick Desaulniers wrote: > Hello folks, > I'm working on putting together an LLVM "Micro Conference" for the > upcoming Linux Plumbers Conf > (https://www.linuxplumbersconf.org/event/7/page/47-attend). It's not > solidified yet, but I would really like to run a session on support > for Rust "in tree." I suspect we could cover technical aspects of > what that might look like (I have a prototype of that, was trivial to > wire up KBuild support), but also a larger question of "should we do > this?" or "how might we place limits on where this can be used?" > > Question to folks explicitly in To:, are you planning on attending plumbers? > > If so, would this be an interesting topic that you'd participate in? I hadn't planned to attend the virtual event, but this sounds like a topic I absolutely have to attend. Please follow up if this proposal gets accepted. I'd love to see a path to incorporating Rust into the kernel, as long as we can ensure that: - There are appropriate Rustic interfaces that are natural and safe to use (not just C FFI, and not *just* trivial transformations like slices instead of buffer+len pairs). - Those Rustic interfaces are easy to maintain and evolve with the kernel. - We provide compelling use cases that go beyond just basic safety, such as concurrency checking, or lifetimes for object ownership. - We make Rust fit naturally into the kernel's norms and standards, while also introducing some of Rust's norms and standards where they make sense. (We want to fit into the kernel, and at the same time, we don't want to hastily saw off all the corners that don't immediately fit, because some of those corners provide value. Let's take our time.) - We move slowly and carefully, making sure it's a gradual introduction, and give people time to incorporate the Rust toolchain into their kernel workflows. Also, with my "Rust language team lead" hat on, I'd be happy to have the Linux kernel feeding into Rust language development priorities. If building Rustic interfaces within the kernel requires some additional language features, we should see what enhancements to the language would best serve those requirements. I've often seen the sentiment that co-evolving Linux and a C compiler would be beneficial for both; I think the same would be true of Linux and the Rust compiler.