Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2024 15:20:45 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>, Kristof Provost <kp@freebsd.org>,  George Mitchell <george+freebsd@m5p.com>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <CAOtMX2jtuAKg21ODwLVg4DMjTU_cDgtCFrLbrKhuT6F5_T10LA@mail.gmail.com>
In-Reply-To: <CANCZdfr9SoCJkyv6i7yVVSfaiQ=Fnw_QQniO1NpnV1F0d7G6OQ@mail.gmail.com>
References:  <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com> <1673801705774097@mail.yandex.ru> <CANCZdfpqWgvV_RCvVO_pvTrmajQFspW%2BQ9TM_Ok3JrXZAfeAfA@mail.gmail.com> <ef4ad207-5899-42b6-8728-bc46f1417e9e@antonovs.family> <202401210751.40L7pWEF011188@critter.freebsd.dk> <40bc1694-ee00-431b-866e-396e9d5c07a2@m5p.com> <CAOtMX2hppfdu5ypDdGpfw_QDcd1rwJEeyVfSk9ogFEm7CiV6Kw@mail.gmail.com> <202401211626.40LGQDim013134@critter.freebsd.dk> <4EF67303-A995-457A-990F-A4972C23EA80@FreeBSD.org> <CANCZdfo_MU4yo_4dvvTB%2BQf3JFT6EVEYZ4cmFHa%2BEJEjs_1crA@mail.gmail.com> <202401212013.40LKD1a7095506@critter.freebsd.dk> <CAOtMX2jvdzB4o%2BsjJ6CDk4tYngp15djZ3_hK99jn_JFnNJreNw@mail.gmail.com> <CANCZdfr9SoCJkyv6i7yVVSfaiQ=Fnw_QQniO1NpnV1F0d7G6OQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 21, 2024 at 2:32=E2=80=AFPM Warner Losh <imp@bsdimp.com> wrote:
>
>
>
> On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers <asomers@freebsd.org> w=
rote:
>>
>> On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp <phk@phk.freeb=
sd.dk> wrote:
>> >
>> > --------
>> > Warner Losh writes:
>> >
>> > > Even if all the cool kids are doing it, it doesn't mean the cool kid=
s are
>> > > wrong. We should not reject the hypothesis on that basis alone.
>> >
>> > I certainly didn't mean to imply that, my point about cvsup was precis=
ely
>> > that the proof of the pudding is in the eating.
>> >
>> > The only comment I want to add, is that the test-cases should be
>> > expressed such that, if/when we find out Rust wasn't God's gift to
>> > programmers, we can reimplement the tool which interprets them in
>> > some hot-language-du-jour, without having to rewrite all the actual
>> > test-cases.
>>
>> I think imp and phk are after different things.  phk wants a tool
>> written in Rust that be installed from ports and interpret test cases
>> defined in src.  That's similar to the fsx tests, which I'm planning
>> to add to src once the package builder catches up.  But imp wants test
>> cases that are actually written in Rust and which live in src, to test
>> his external toolchain proposal.  That's very different.  It's an
>> unusual requirement.  Off hand I can't think of many subsystems that
>> are a good match for a test suite like that.  ypclnt(3) might be one.
>
>
> Hmmm, I'd kinda thought you wanted to rewrite fsx in rust and use it
> as part of the kyua tests, much like io.cc simulates some of the things
> fsx does. I didn't care about the details of whether it was a test case,
> used by test cases or interprets the results. It really doesn't matter to
> me beyond (a) it's used to test the system or some aspect of the system
> and (b) it's written in rust and compiled when we generally compile the
> other tests and test-like things. I thought this was exactly what you wer=
e
> proposing as one of the things that would show how writing it in rust
> would give us some benefit.
>
> But to be honest, I'm agnostic about how the 'build rust things in base
> via external toolchain' stuff is used for. The important thing is that so=
mething
> non-critical be selected as a pilot project to see whether the hassles of
> adding this, maintaining the port, and the resulting better outcomes
> because it's in rust. I proposed something related to testing (the (a) ab=
ove)
> because that's well segregated from the rest of the system and it's
> something that could be redone, in all likelihood, in some other language
> should the need arise. I had thought fsx and fsx-rs would provide a nice
> compare and contrast study if they gave us approximately the same things.
>
> And besides, it's just my opinion of what project would be both useful an=
d produce
> good data about using Rust in the base. I'm sure others could be proposed
> as well.
>
> Warner

The fsx rewrite is already complete and it's in ports.  I don't see
any benefit to bringing it back to src other than to test your
external toolchain proposal.  Do you still want to do it?



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