Re: It's not Rust, it's FreeBSD (and LLVM)

From: Alan Somers <asomers_at_freebsd.org>
Date: Tue, 03 Sep 2024 22:43:03 UTC
On Tue, Sep 3, 2024 at 4:32 PM Rein Fernhout (Levitating)
<me@levitati.ng> wrote:
>
> I actually think Rust could be an opportunity to modernize the FreeBSD
> src.
>
> But if it is decided that no utilities found in FreeBSD will be eligible
> for a Rust rewrite then I don't see why it should be part of src.
>
> I do think Rust is mature enough for adoption into src. These
> discussions have been riddled with misconceptions about Rust (and its
> use in the Linux kernel).
>
> Each FreeBSD release could just pin a stable release of the Rust
> toolchain, it is common for Rust projects to have a Minimum Supported
> Rust Version (MSRV).
> Also Rust does have an extremely strong ecosystem. It includes gems like
> the Serde serialization framework and the Clap argument parser.
>
> I would personally like to potentially see parts of FreeBSD rewritten in
> rust.
> I think it would invite much more contributors in the long term.
> However I don't see rust rewrites happen anytime soon. And if we only
> allow new programs in Rust to enter src then I don't think it is worth
> the burden of supporting a rust toolchain (and its dependencies).

+1.  We have some utilities of subpar quality that could benefit from
a rewrite, even if it must be in C.  But it would be easier and less
buggy to rewrite them in Rust.  As a programmer fluent in both
languages, I'm never going to waste my time writing new software (or
rewriting old software) in C unless there's a very very good reason.
However, the "only new utilities in Rust" limitation isn't completely
useless, if it gives us the confidence to allow rewrites later on.

-Alan