Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2024 16:43:03 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        "Rein Fernhout (Levitating)" <me@levitati.ng>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, freebsd-hackers@freebsd.org
Subject:   Re: It's not Rust, it's FreeBSD (and LLVM)
Message-ID:  <CAOtMX2hitfPwQ6E0obGxOKg23asEW39roauRdpR6kHoj3zg18w@mail.gmail.com>
In-Reply-To: <99fe98c0974bc1778e26097eec3fc244@purelymail.com>
References:  <202409031532.483FW0If007252@critter.freebsd.dk> <99fe98c0974bc1778e26097eec3fc244@purelymail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 3, 2024 at 4:32=E2=80=AFPM 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2hitfPwQ6E0obGxOKg23asEW39roauRdpR6kHoj3zg18w>