From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E46C72 for ; Tue, 6 Jul 2021 18:27:01 +0000 (UTC) Received: by mail-lj1-f180.google.com with SMTP id u25so30347561ljj.11 for ; Tue, 06 Jul 2021 11:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=y+jSgguqQMJ63Hz0tCFlpYUfIugvGoGLFiwg8LiB4Ig=; b=mP/4pcpwhAOIyO9abbmm7Tpwu5xmzC1wGzTPsVv46KdDUpnoDZpitV+R6c+FNV7leJ vco9cS6v67ChmyD5bT9TvnO7g72SDxwlvxLYGPABEhcGl+tX1/FKciB9+1lOxJTrbLsq wI7KA9leLIAcE+53cTmXpBBd4euOSyAHCM3mWOy4eeko6kn1slQxcwEbprT47zkD2+JD uDlD7iKr0eqR/FHqDZ/US0tFCghL1L8xOE/daFTSoQ7qQBOP6o4u4AN0wpO9iIiFWiRk icg8F+macZiBRhZWWkxikp6elzr4ZEmFhQrM2m4zSYvY/NM4TAHPMjxlsumsriPq6ft3 1rhg== 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=y+jSgguqQMJ63Hz0tCFlpYUfIugvGoGLFiwg8LiB4Ig=; b=Ud5RUljE7l5hT9MYriLoVzHyDzOwmAEMF66f23L88O99KH0h4Vd7nfPyc4Y+d1N3dc 1jr1+FeXepdRmwrN0quD0maypAYufLlwDRNTR2megCM5ruwkYJjGXwYQeOCSf8mrIbtC RMH4stk2bTFtAJQVsNRsQEx995TAyPb2z3neMYHKVrhFn3xBe0Ob4mxVPqMuIKtGlYtY geoSwJJ5tqva0+UTZG25kDDwp+AGul/SUYkpYRTqXyfWB7fM7ZsayjQZvzXXakFkZ7Ef CVJ8WbYPusz/QsXEzmMW4fk4kEmSiw8PMMygK/4QPayjjHvL9vxbQj/n9ayAHjz1GX24 r7zQ== X-Gm-Message-State: AOAM532/wbNObcsnqmKyI3KfFvgBUCKiqCOPQmEByawv8XKIt5ZnXvHD uxkFwjdwVovKY+CrUmwpoe1M9QFa46IMM2QoMGGrOFOcDJdU+w== X-Google-Smtp-Source: ABdhPJyImtpnGiErZ4QqYOwbt6kTiqFpd3oQz6u3iNRR8i/BJQ3OzIuo62sFI2J1UvsJ1E4WxjfLu9Ul8SCYKMrbRKg= X-Received: by 2002:a2e:9483:: with SMTP id c3mr16166204ljh.273.1625596019540; Tue, 06 Jul 2021 11:26:59 -0700 (PDT) Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: Linus Walleij Date: Tue, 6 Jul 2021 20:26:48 +0200 Message-ID: Subject: Re: [TECH TOPIC] Rust for Linux To: Miguel Ojeda Cc: Leon Romanovsky , ksummit@lists.linux.dev Content-Type: text/plain; charset="UTF-8" On Tue, Jul 6, 2021 at 4:30 PM Miguel Ojeda wrote: > In other words, what we are doing is "abstract" the C APIs into Rust > APIs that can ensure as many invariants as possible statically, using > Rust facilities for that. Thus Rust is one more consumer of the C > APIs. This reasoning assumes that Rust is in the "leafs" of the kernel, if such a thing even exists, and device drivers have been mentioned. If we want to *write* a subsystem in Rust then of course it will go the other way: Rust need to expose APIs to C. And I assume the grand vision is that after that Rust will eat Linux, one piece at a time. If it proves better than C, that is. The leaf nodes imagined as a starting point is some device driver subsystem where individual drivers for that subsystem can be written or rewritten in Rust, correct? And I asked very pointed questions as to whether device drivers is really a good place to start. If the whole rationale with doing device drivers first is strategic, not necessarily bringing any benefits to that device driver subsystem but rather serving as a testing ground and guinea pig, then that strategy needs to be explicit and understood by everyone. So while we understand that Rust as all these $UPSIDES doing device drivers first is purely strategic, correct? I think the ability to back out the whole thing if it wasn't working out was mentioned too? Yours, Linus Walleij