From nobody Mon Oct 14 22:45:10 2024 X-Original-To: emulation@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XSC432J7Xz5ZHXK for ; Mon, 14 Oct 2024 22:45:23 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XSC422Npvz43T3 for ; Mon, 14 Oct 2024 22:45:22 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20230601.gappssmtp.com header.s=20230601 header.b=IwGs9bb3; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::52e) smtp.mailfrom=wlosh@bsdimp.com; dmarc=none Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-7db90a28cf6so3952087a12.0 for ; Mon, 14 Oct 2024 15:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1728945921; x=1729550721; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=o0G+fHGmlxGZknduHykTBG/2v1aDLLDLXHsEXf5hswU=; b=IwGs9bb3xGApZ6UUJSTjNL09N/+ywy6HfIXro3SJbiiOHRG+7tznT8IyfchwBqwKbI 6gSj60oIrQhhXmpbBRrgH4olj3bRI3XhHOzlGsN8G6n1Z01+NEso/iMD7NlEGuL7g+R3 eVpCuyRHMPpxSSXvYSWupsaBPw332LCPUAhMWQGZTHrHa0Vf0ErjFAoTN/l/fFO9SQoy wPbTgrp/ytrHtSqjnUPigQKrB+VwZuvkmL6yFMYbyrP2Xnuun6rcXzCobN+FrVrqUyHM TtqecrxvuJGN2zuVB3V1ay2PjZphrphMQ1U4BJkQYLj0te6gpUKIu3vMKrwdQ25VhHXe tkhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728945921; x=1729550721; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=o0G+fHGmlxGZknduHykTBG/2v1aDLLDLXHsEXf5hswU=; b=aF5Tf6U+v+aHqWgF8xISokgCrKVaVBj8yf99mMVbCA9xBXTl+tKnXibdJV3tXU37yD gOfFjQ3BsB4kUEkXE9agZmqKFhDFMuvhvfHCEAy0VzeEhQeVuLmYiBXlZf5dCf2waKEQ lfGQOiTajLGwf5sAnQhDFJtTGFoEtQriSzPZ9PH/Tdf2WFUP85/uUIcJS5WszJnQAt63 qu6NoBumtk1I9+5aPUpJKWKPVZdbtRasOmEL9SVxkQiD42kzVTxSpLjCY0a8cepOHPrH m6J6kHx5C+kCfM6hu+2mMns0+D1vEQsncSXnRAZcZogOM24Yd7oGNqYMY6npiJvX8QIz tq7g== X-Forwarded-Encrypted: i=1; AJvYcCUGhmqelyPdexAx44UOVeDfqEMt7ASiyYjbnq5gG9e211UkTW78f6dHlMKvHhvt2PKf0JStNFhTelc=@freebsd.org X-Gm-Message-State: AOJu0Yy7d1eGtslIgCV+tzG2ftKLbhCVu04OaDoo3u8omJjzmrBb0Zyi wxtwWAq6nRhRLFSh9fr3F1j6AYdKLaVUSrEQvKnY7XuwgdYG87NOSRzCY/pITjajDmiM+z2mwCp n8CCy5TCcVN7fdE06T8qC00Yesvbopj8iFKc5sg== X-Google-Smtp-Source: AGHT+IFGHi+CZbvmEWhSEjs85Wvh2/3NbNXm0txiiRskSSZrwJRfvw7WLUlLKRk1PIluvkmvI5b26SvC3cNjDDCA39s= X-Received: by 2002:a05:6a21:2d09:b0:1d5:377c:2244 with SMTP id adf61e73a8af0-1d8bc993b0cmr22033999637.20.1728945921153; Mon, 14 Oct 2024 15:45:21 -0700 (PDT) List-Id: Development of Emulators of other operating systems List-Archive: https://lists.freebsd.org/archives/freebsd-emulation List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-emulation@FreeBSD.org MIME-Version: 1.0 References: <871q16fq9c.fsf@draig.linaro.org> <87v7y9ldbu.fsf@draig.linaro.org> In-Reply-To: <87v7y9ldbu.fsf@draig.linaro.org> From: Warner Losh Date: Mon, 14 Oct 2024 16:45:10 -0600 Message-ID: Subject: Re: Rust BoF and maintainer minutes and planning the roadmap to Rust To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: qemu-devel , Manos Pitsidianakis , Hanna Reitz , Peter Maydell , pkg-qemu-devel@lists.alioth.debian.org, Michael Tokarev , ncopa@alpinelinux.org, bofh@freebsd.org, emulation@freebsd.org, virtualization@gentoo.org, dilfridge@gentoo.org, hi@alyssa.is, edolstra+nixpkgs@gmail.com, brad@comstyle.com, =?UTF-8?Q?Daniel_P_=2E_Berrang=C3=A9?= , Paolo Bonzini , Markus Armbruster , Thomas Huth , Stefan Hajnoczi , dvzrv@archlinux.org, anatol.pomozov@gmail.com, Miroslav Rezanina Content-Type: multipart/alternative; boundary="000000000000777a2806247797b3" X-Spamd-Result: default: False [-1.50 / 15.00]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20230601.gappssmtp.com:s=20230601]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_TWELVE(0.00)[23]; FREEMAIL_CC(0.00)[nongnu.org,linaro.org,redhat.com,lists.alioth.debian.org,tls.msk.ru,alpinelinux.org,freebsd.org,gentoo.org,alyssa.is,gmail.com,comstyle.com,archlinux.org]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DKIM_TRACE(0.00)[bsdimp-com.20230601.gappssmtp.com:+]; R_SPF_NA(0.00)[no SPF record]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[emulation@freebsd.org]; TAGGED_RCPT(0.00)[nixpkgs]; MLMMJ_DEST(0.00)[emulation@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52e:from] X-Rspamd-Queue-Id: 4XSC422Npvz43T3 X-Spamd-Bar: - --000000000000777a2806247797b3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [[ sorry for the lag $LIFE has been over-full lately ]] On Thu, Oct 3, 2024 at 3:56=E2=80=AFAM Alex Benn=C3=A9e wrote: > Warner Losh writes: > > > On Thu, Oct 3, 2024 at 2:53=E2=80=AFAM Warner Losh wro= te: > > > > On Thu, Sep 26, 2024 at 8:24=E2=80=AFAM Alex Benn=C3=A9e > wrote: > > > > One output from this discussion should be a clear statement that we ar= e > > going forward with this work and the road map. A rough roadmap might > > look like: > > > > - 9.2 --enable-rust is available and developers can build with it. > > rust devices have -x-device or -rust-device CLI flags for > > runtime selection. > > > > - 10.x rust devices feature complete and migration compatible, > enabled > > by default when rust compiler detected. No CLI selection > > required as legacy portions won't be built. Any partial > > conversions should be behind --enable-prototype-rust configu= re > > flag. > > > > - 11.x distros have enough infrastructure to build on supported > > platforms. Rust becomes a mandatory dependency, old C versio= ns > > of converted code removed from build. > > > > - xx.y QEMU becomes a pure native rust program and all C is expunge= d. > > We may never get to this point. > > > > We should publish the intention and the road map prominently although = it > > was unclear if a blog post would be the best place vs expanding a > > section in the developers manual. Perhaps both make sense with a blog > > post for the statement of intent and rough timeline and the developer > > manual being expanded with any new rules and standards to follow? > > > > FreeBSD is Tier 1 in rust only for amd64 (x86_64). It's Tier 2 for i38= 6 > (which > > admittedly is going away) and Tier 3 for everything else. > > > > oops, I should have said it's Tier 2 with hosts for amd64, Tier 2 w/o > hosts and > > tier 3 for aarch64 (and everything else). In FreeBSD, amd64 and aarch64 > are > > tier 1 supported platforms and I got those confused. It is an important > difference > > and later in my email I refer to it, so I thought a correction was in > > order. > > Are there any other big projects coming down the line that have > indicated a need for rust support? There's a few things that may happen to help drive rust. People have written a few things in rust that they hope to make default once FreeBSD finishes its transition to pkgbase (though that's some time in the future). There's also a desire to experiment with rust drivers in the kernel for more fringe features to see if that helps us get done faster. > Obviously you don't have to worry > about the Linux kernel but I wonder how much rust userspace you > currently have packaged? Do you have the rust-vmm vhost-device binaries > for example? > Yes. I believe we build those today. I expect it to mostly work, most of the time, to be honest on FreeBSD. I also expect there to be more breakage than we see with llvm/clang... So the bottom line should be that we'll be able to make it work, but there is likely going to be more work since rust is less mature than C. However, it's not clear if this is an occasional minor thing, or if it becomes major and frequent. And the only way to know that is to take the plunge, so don't let this stop your plans. Warner --000000000000777a2806247797b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
[[ sorry=C2=A0for the lag $LIFE has been = over-full lately ]]

On Thu, Oct 3, 2024 at 3:56=E2=80=AFAM Alex Benn=C3=A9e = <alex.bennee@linaro.org>= ; wrote:
Warner = Losh <imp@bsdimp.com= > writes:

> On Thu, Oct 3, 2024 at 2:53=E2=80=AFAM Warner Losh <imp@bsdimp.com> wrote:
>
>=C2=A0 On Thu, Sep 26, 2024 at 8:24=E2=80=AFAM Alex Benn=C3=A9e <alex.bennee@linaro= .org> wrote:
>
>=C2=A0 One output from this discussion should be a clear statement that= we are
>=C2=A0 going forward with this work and the road map. A rough roadmap m= ight
>=C2=A0 look like:
>
>=C2=A0 =C2=A0 - 9.2=C2=A0 =C2=A0--enable-rust is available and develope= rs can build with it.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rust devices have -x-device o= r -rust-device CLI flags for
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 runtime selection.
>
>=C2=A0 =C2=A0 - 10.x=C2=A0 rust devices feature complete and migration = compatible, enabled
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 by default when rust compiler= detected. No CLI selection
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 required as legacy portions w= on't be built. Any partial
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 conversions should be behind = --enable-prototype-rust configure
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 flag.
>
>=C2=A0 =C2=A0 - 11.x=C2=A0 distros have enough infrastructure to build = on supported
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 platforms. Rust becomes a man= datory dependency, old C versions
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 of converted code removed fro= m build.
>
>=C2=A0 =C2=A0 - xx.y=C2=A0 QEMU becomes a pure native rust program and = all C is expunged.
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 We may never get to this poin= t.
>
>=C2=A0 We should publish the intention and the road map prominently alt= hough it
>=C2=A0 was unclear if a blog post would be the best place vs expanding = a
>=C2=A0 section in the developers manual. Perhaps both make sense with a= blog
>=C2=A0 post for the statement of intent and rough timeline and the deve= loper
>=C2=A0 manual being expanded with any new rules and standards to follow= ?
>
>=C2=A0 FreeBSD is Tier 1 in rust only for amd64 (x86_64). It's Tier= 2 for i386 (which
>=C2=A0 admittedly is going away) and Tier 3 for everything else.
>
> oops, I should have said it's Tier 2 with hosts for amd64, Tier 2 = w/o hosts and
> tier 3 for aarch64 (and everything else). In FreeBSD, amd64 and aarch6= 4 are
> tier 1 supported platforms and I got those confused. It is an importan= t difference
> and later in my email I refer to it, so I thought a correction was in<= br> > order.

Are there any other big projects coming down the line that have
indicated a need for rust support?

There= 9;s a few things that may happen to help drive rust. People
have = written a few things in rust that they hope to make default
once = FreeBSD finishes its transition to pkgbase (though that's some
time in the future). There's also a desire to experiment with rust dr= ivers
in the kernel for more fringe features to see if that helps= us get done
faster.
=C2=A0
Obviously you don't have to worry
about the Linux kernel but I wonder how much rust userspace you
currently have packaged? Do you have the rust-vmm vhost-device binaries
for example?

Yes. I believe we build th= ose today.

I expect it to mostly work, most of the= time, to be honest on FreeBSD. I also
expect there to be more br= eakage than we see with llvm/clang...

So the botto= m line should be that we'll be able to make it work, but there
is likely going to be more work since rust is less mature than C. However= ,
it's not clear if this is an occasional minor thing, or if = it becomes major and
frequent. And the only way to know that is t= o take the plunge, so don't
let this stop your plans.

Warner
--000000000000777a2806247797b3--