Re: Rust BoF and maintainer minutes and planning the roadmap to Rust

From: Warner Losh <imp_at_bsdimp.com>
Date: Mon, 14 Oct 2024 22:45:10 UTC
[[ sorry for the lag $LIFE has been over-full lately ]]

On Thu, Oct 3, 2024 at 3:56 AM Alex Bennée <alex.bennee@linaro.org> wrote:

> Warner Losh <imp@bsdimp.com> writes:
>
> > On Thu, Oct 3, 2024 at 2:53 AM Warner Losh <imp@bsdimp.com> wrote:
> >
> >  On Thu, Sep 26, 2024 at 8:24 AM Alex Bennée <alex.bennee@linaro.org>
> wrote:
> >
> >  One output from this discussion should be a clear statement that we are
> >  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 configure
> >            flag.
> >
> >    - 11.x  distros have enough infrastructure to build on supported
> >            platforms. Rust becomes a mandatory dependency, old C versions
> >            of converted code removed from build.
> >
> >    - xx.y  QEMU becomes a pure native rust program and all C is expunged.
> >            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 i386
> (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