Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jan 2024 15:50:13 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Alan Somers <asomers@freebsd.org>
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:  <CANCZdfpHBkyUVaKeayH9UcKs_xyeMO1C83L9wGnrnJwjKc-nRw@mail.gmail.com>
In-Reply-To: <CAOtMX2jtuAKg21ODwLVg4DMjTU_cDgtCFrLbrKhuT6F5_T10LA@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> <CAOtMX2jtuAKg21ODwLVg4DMjTU_cDgtCFrLbrKhuT6F5_T10LA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f83ac7060f7c8994
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sun, Jan 21, 2024, 3:20=E2=80=AFPM Alan Somers <asomers@freebsd.org> wro=
te:

> On Sun, Jan 21, 2024 at 2:32=E2=80=AFPM Warner Losh <imp@bsdimp.com> wrot=
e:
> >
> >
> >
> > On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers <asomers@freebsd.org>=
 wrote:
> >>
> >> On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp <phk@phk.fre=
ebsd.dk>
> wrote:
> >> >
> >> > --------
> >> > Warner Losh writes:
> >> >
> >> > > Even if all the cool kids are doing it, it doesn't mean the cool
> kids 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
> precisely
> >> > 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
> were
> > 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
> something
> > 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)
> above)
> > 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 langua=
ge
> > should the need arise. I had thought fsx and fsx-rs would provide a nic=
e
> > compare and contrast study if they gave us approximately the same thing=
s.
> >
> > And besides, it's just my opinion of what project would be both useful
> and produce
> > good data about using Rust in the base. I'm sure others could be propos=
ed
> > 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?
>

I'm happy to assist anybody that wants to run the experiment. But I'd never
planned on driving it. That's for people advocating for the change. If
someone wants to build rust things as a demonstration project I'll help
with the build system aspects.

Warner

>

--000000000000f83ac7060f7c8994
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Sun, Jan 21, 2024, 3:20=E2=80=AFPM Alan Somers &lt;=
<a href=3D"mailto:asomers@freebsd.org">asomers@freebsd.org</a>&gt; wrote:<b=
r></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border=
-left:1px #ccc solid;padding-left:1ex">On Sun, Jan 21, 2024 at 2:32=E2=80=
=AFPM Warner Losh &lt;<a href=3D"mailto:imp@bsdimp.com" target=3D"_blank" r=
el=3D"noreferrer">imp@bsdimp.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Jan 21, 2024, 2:04=E2=80=AFPM Alan Somers &lt;<a href=3D"mailt=
o:asomers@freebsd.org" target=3D"_blank" rel=3D"noreferrer">asomers@freebsd=
.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Sun, Jan 21, 2024 at 1:13=E2=80=AFPM Poul-Henning Kamp &lt;<a h=
ref=3D"mailto:phk@phk.freebsd.dk" target=3D"_blank" rel=3D"noreferrer">phk@=
phk.freebsd.dk</a>&gt; wrote:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --------<br>
&gt;&gt; &gt; Warner Losh writes:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; &gt; Even if all the cool kids are doing it, it doesn&#39;t m=
ean the cool kids are<br>
&gt;&gt; &gt; &gt; wrong. We should not reject the hypothesis on that basis=
 alone.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I certainly didn&#39;t mean to imply that, my point about cvs=
up was precisely<br>
&gt;&gt; &gt; that the proof of the pudding is in the eating.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The only comment I want to add, is that the test-cases should=
 be<br>
&gt;&gt; &gt; expressed such that, if/when we find out Rust wasn&#39;t God&=
#39;s gift to<br>
&gt;&gt; &gt; programmers, we can reimplement the tool which interprets the=
m in<br>
&gt;&gt; &gt; some hot-language-du-jour, without having to rewrite all the =
actual<br>
&gt;&gt; &gt; test-cases.<br>
&gt;&gt;<br>
&gt;&gt; I think imp and phk are after different things.=C2=A0 phk wants a =
tool<br>
&gt;&gt; written in Rust that be installed from ports and interpret test ca=
ses<br>
&gt;&gt; defined in src.=C2=A0 That&#39;s similar to the fsx tests, which I=
&#39;m planning<br>
&gt;&gt; to add to src once the package builder catches up.=C2=A0 But imp w=
ants test<br>
&gt;&gt; cases that are actually written in Rust and which live in src, to =
test<br>
&gt;&gt; his external toolchain proposal.=C2=A0 That&#39;s very different.=
=C2=A0 It&#39;s an<br>
&gt;&gt; unusual requirement.=C2=A0 Off hand I can&#39;t think of many subs=
ystems that<br>
&gt;&gt; are a good match for a test suite like that.=C2=A0 ypclnt(3) might=
 be one.<br>
&gt;<br>
&gt;<br>
&gt; Hmmm, I&#39;d kinda thought you wanted to rewrite fsx in rust and use =
it<br>
&gt; as part of the kyua tests, much like io.cc simulates some of the thing=
s<br>
&gt; fsx does. I didn&#39;t care about the details of whether it was a test=
 case,<br>
&gt; used by test cases or interprets the results. It really doesn&#39;t ma=
tter to<br>
&gt; me beyond (a) it&#39;s used to test the system or some aspect of the s=
ystem<br>
&gt; and (b) it&#39;s written in rust and compiled when we generally compil=
e the<br>
&gt; other tests and test-like things. I thought this was exactly what you =
were<br>
&gt; proposing as one of the things that would show how writing it in rust<=
br>
&gt; would give us some benefit.<br>
&gt;<br>
&gt; But to be honest, I&#39;m agnostic about how the &#39;build rust thing=
s in base<br>
&gt; via external toolchain&#39; stuff is used for. The important thing is =
that something<br>
&gt; non-critical be selected as a pilot project to see whether the hassles=
 of<br>
&gt; adding this, maintaining the port, and the resulting better outcomes<b=
r>
&gt; because it&#39;s in rust. I proposed something related to testing (the=
 (a) above)<br>
&gt; because that&#39;s well segregated from the rest of the system and it&=
#39;s<br>
&gt; something that could be redone, in all likelihood, in some other langu=
age<br>
&gt; should the need arise. I had thought fsx and fsx-rs would provide a ni=
ce<br>
&gt; compare and contrast study if they gave us approximately the same thin=
gs.<br>
&gt;<br>
&gt; And besides, it&#39;s just my opinion of what project would be both us=
eful and produce<br>
&gt; good data about using Rust in the base. I&#39;m sure others could be p=
roposed<br>
&gt; as well.<br>
&gt;<br>
&gt; Warner<br>
<br>
The fsx rewrite is already complete and it&#39;s in ports.=C2=A0 I don&#39;=
t see<br>
any benefit to bringing it back to src other than to test your<br>
external toolchain proposal.=C2=A0 Do you still want to do it?<br></blockqu=
ote></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">I&#39;m happy=
 to assist anybody that wants to run the experiment. But I&#39;d never plan=
ned on driving it. That&#39;s for people advocating for the change. If some=
one wants to build rust things as a demonstration project I&#39;ll help wit=
h the build system aspects.</div><div dir=3D"auto"><br></div><div dir=3D"au=
to">Warner</div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex">
</blockquote></div></div></div>

--000000000000f83ac7060f7c8994--



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