Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Aug 2024 11:36:52 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Shawn Webb <shawn.webb@hardenedbsd.org>
Cc:        Alan Somers <asomers@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>,  Scott Long <scottl@freebsd.org>, "Goran Meki??" <meka@tilda.center>
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <CANCZdfoHjYUDeNo78qk6BjHfRgwgDbuuVjD5D9uG6tyCk81-ew@mail.gmail.com>
In-Reply-To: <knnsh327gxyvaajwrymvflnivf3tsnigyqw2d6etfhb4irft3x@ydkh3zmb6uch>
References:  <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com> <vdmg5zocd6wqcwc2bvzvzqn4bii2pwdc2r4mgnisukfkboj6nf@f7lv5quu4fjx> <CAOtMX2iDK3uN_oQgzzZAdoOZCfNsnvpefeZvKoTCRmPBhZywzA@mail.gmail.com> <CANCZdfqB1%2B-8BkpKwKoCM%2BzM4mCOFy63yHr1Pco7MnT1DFkb4w@mail.gmail.com> <knnsh327gxyvaajwrymvflnivf3tsnigyqw2d6etfhb4irft3x@ydkh3zmb6uch>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Wed, Jul 31, 2024 at 12:51 PM Shawn Webb <shawn.webb@hardenedbsd.org>
wrote:

> On Wed, Jul 31, 2024 at 11:01:17AM -0600, Warner Losh wrote:
> > On Wed, Jul 31, 2024, 9:40 AM Alan Somers <asomers@freebsd.org> wrote:
> >
> > > On Wed, Jul 31, 2024 at 8:37 AM Shawn Webb <shawn.webb@hardenedbsd.org
> >
> > > wrote:
> > > >
> > > > On Sat, Jan 20, 2024 at 09:51:25AM -0700, Alan Somers wrote:
> > > > > In a recent thread on src-committers, we discussed the costs and
> > > > > benefits of including Rust code in the FreeBSD base system.  To
> > > > > summarize, the cost is that it would double our build times.  imp
> > > > > suggested adding an additional step after buildworld for stuff that
> > > > > requires an external toolchain.  That would ease the build time
> pain.
> > > > > The benefit is that some tools would become easier to write, or
> even
> > > > > become possible.  Here is a list of actual and potential Rust
> projects
> > > > > that could benefit from being in-tree.  If anybody else has items
> to
> > > > > add, I suggest moving this into the project wiki:
> > > > >
> > > > > Stuff that could only be written in Rust if it were in base
> > > > > ===========================================================
> > > > >
> > > > > * ctl-exporter (I started this, but discovered that the CTL stats
> API
> > > is
> > > > >   unstable, so it can't live in ports.  Instead, I had to do it in
> C).
> > > > >
> > >
> https://github.com/freebsd/freebsd-src/commit/1a7f22d9c211f504f6c48a86401469181a67ec34
> > > > >
> > > > > * fusefs tests.  Absolutely impossible to do in C.  I considered
> Rust,
> > > but went
> > > > >   with C++ so they could live in base.  They are too closely
> coupled to
> > > > >   fusefs(5) to live out-of-tree.
> > > > >
> https://github.com/freebsd/freebsd-src/tree/main/tests/sys/fs/fusefs
> > > > >
> > > > > * devd.  Currently C++, but imp suggested a rewrite.
> > > > >   https://github.com/freebsd/freebsd-src/tree/main/sbin/devd
> > > > >
> > > > > * zfsd.  Currently C++, but I've long pondered a rewrite.  Using
> Rust
> > > would
> > > > >   make it more testable.
> > > > >
> https://github.com/freebsd/freebsd-src/tree/main/cddl/usr.sbin/zfsd
> > > > >
> > > > > * nscd.  Currently C, but confusing and with no test coverage.
> I've
> > > > >   contemplated a rewrite myself, but I don't want to do it in C.
> > > > >   https://github.com/freebsd/freebsd-src/tree/main/usr.sbin/nscd
> > > > >
> > > > > * The userland portion of the 802.11ac and Lightning stacks.
> scottl
> > > suggested
> > > > >   that these were good candidates for Rust.
> > > > >
> > > > > * freebsd-kpi-r14-0 .  https://crates.io/crates/freebsd-kpi-r14-0
> > > > >
> > > > > Stuff that can live in ports, but would be nicer in base
> > > > > ========================================================
> > > > >
> > > > > * gstat-rs https://crates.io/crates/gstat
> > > > >
> > > > > * geom-exporter (I've started this, but haven't published it)
> > > > >
> > > > > * nfs-exporter https://crates.io/crates/freebsd-nfs-exporter
> > > > >
> > > > > * virtiofsd-rs .  Nobody has yet tried to port it to FreeBSD.  But
> if
> > > the
> > > > >   connection to bhyve(8) is too intimate, it might be hard to do in
> > > ports.
> > > > >   https://gitlab.com/virtio-fs/virtiofsd
> > > > >
> > > > > * jail-exporter https://crates.io/crates/jail_exporter
> > > > >
> > > > > * Various jail managers have been attempted in Rust.  I think these
> > > are fine in
> > > > >   ports, but others like Goran Mekic have opined that they should
> be
> > > moved to
> > > > >   base instead.
> > > > >
> > > > > * musikid's pjdfstest rewrite.  I think it would be great to start
> > > using this
> > > > >   to test the base system's file systems.  If the tests themselves
> > > lived in
> > > > >   base, they would be easier to sync with file system development.
> > > > >   https://github.com/musikid/pjdfstest
> > > > >
> > > > > * pf-rs.  I suspect that the API isn't very stable.
> > > > >   https://crates.io/crates/pf-rs
> > > > >
> > > > > * benchpmc.  The pmc counter names changes between releases.
> > > > >   https://crates.io/crates/benchpmc
> > > > >
> > > > > FreeBSD-related applications that are just fine in ports
> > > > > =========================================================
> > > > >
> > > > > * fsx-rs.  Unlike pjdfstest, this only tests datapath APIs.  Those
> are
> > > usually
> > > > >   more stable than control path APIs, so I think there's little to
> be
> > > gained by
> > > > >   moving this into base. https://crates.io/crates/fsx
> > > > >
> > > > > * ztop.  It uses ZFS's kstats sysctl interface, which is pretty
> stable.
> > > > >   https://crates.io/crates/ztop
> > > > >
> > > > > * iocage-provision  https://crates.io/crates/iocage-provision
> > > > >
> > > > > * rsblk https://crates.io/crates/rsblk
> > > > >
> > > > > * xfuse  https://github.com/KhaledEmaraDev/xfuse
> > > > >
> > > > > Other FreeBSD-related libraries in Rust
> > > > > =======================================
> > > > > Just see the list at https://crates.io/keywords/freebsd
> > > > >
> > > >
> > > > One new data point: DARPA is looking to rewrite a significant amount
> > > > of C code to Rust with their "Translating All C to Rust (TRACTOR)"
> > > > project:
> > > > https://sam.gov/opp/1e45d648886b4e9ca91890285af77eb7/view
> > >
> > > Interesting.  And since you bring it up, I have two new data points
> myself:
> > >
> > > * ctld: while working on some bugs in ctld, I had trouble
> > > understanding the config file parsing.  So I rewrote that part in
> > > Rust, just to help my understanding.  Later, I rewrote the XML
> > > parsing, too.  Then I rewrote the LUN creation and deletion, just to
> > > see how hard it would be.  All of those parts take about 5x fewer SLOC
> > > in Rust than in C, and they're less buggy, too.  Config file parsing
> > > is more consistent, no memory leaks, etc.  Alas, I'm not planning to
> > > finish this project, since the base system doesn't allow Rust and ctld
> > > is too tightly coupled to ctl to live in ports.
> > >
> >
> > Cool. Still waiting for anybody to take me up on the offer to do build
> > system integration. Since the Rust advocates can't get even this basic
> step
> > done for review, it's going to be impossible to have Rust in the base.
> This
> > isn't even integrate rust compiler like we do with llvm, but with
> external
> > Rust toolchain.
> >
> > Until somebody steps up for this task, the status quo can't possibly
> change.
>
> Back at the FreeBSD Developer Summit at this last BSDCan, there was
> interest in supporting optional external toolchains in the src build
> framework. You had mentioned you would be happy to mentor someone, but
> not do the nitty gritty yourself.
>

Yes. I've made that offer half a dozen times now.


> I could carve off some time in September to be the primary developer,
> doing the nitty gritty work. Would you be comfortable answering my
> questions, should I have any?
>

You bet. I'd love to see progress made on this front. But I'm in Ireland
on vacation half the month, so there may be timing issues. Other than that,
I'm happy.


> Also: what work (or research), if any, has been done on the concept of
> external toolchain support for optional components in the FreeBSD
> source tree? Am I starting afresh or building upon existing work?
>

We already have clang and gcc external tool chains, so there's a proven
mechanism for that. But there's not a good notion of the concept "I have
a rust compiler" or "I depend on rust". And there's no concept of crates
or similar that rust programs use, but that will be one thorny area that
we'll have to design for. Do we just pull them in and junk any notion of
a reproducible build for these components into the future (since any crate
can go away), or do we have a way to build up our own set of crates
in the tree that the optional components depend on. How do we do change
management on that if we have multiple programs that depend on a crate
that's updated? how do we keep things fresh while not having update
cascades be too burdensome a task. How does this tie into pkgbase?

These are the things to think about. We don't need to solve all of
them, but the Rust ecosystem is quite a bit different than the C ecosystem
in the details of a number of these points, so we have to address them
if we want to use Rust in base with the same traits as all the other bits
in base today (or we need to have a thoughtful discussion on paradigm
shift and settle on that). To my thinking, pkgbase might be a good way
to segregate crates that are build from the base tree and express
dependencies
on optional components that use it, and have the ultimate dependency
be a pkg from ports.

These questions and design points aren't hard and aren't designed to
block anything, but a bare minimum of what we need to articulate is the
vision for these components. Likely a design document that spells these
out in some degree of detail (or that we punt in this phase) would be good
as well. I can help with that as well.

Warner


> Thanks,
>
> --
> Shawn Webb
> Cofounder / Security Engineer
> HardenedBSD
>
> Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50
>
> https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc
>

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 31, 2024 at 12:51 PM Shawn Webb &lt;<a href="mailto:shawn.webb@hardenedbsd.org">shawn.webb@hardenedbsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wed, Jul 31, 2024 at 11:01:17AM -0600, Warner Losh wrote:<br>
&gt; On Wed, Jul 31, 2024, 9:40 AM Alan Somers &lt;<a href="mailto:asomers@freebsd.org" target="_blank">asomers@freebsd.org</a>&gt; wrote:<br>
&gt; <br>
&gt; &gt; On Wed, Jul 31, 2024 at 8:37 AM Shawn Webb &lt;<a href="mailto:shawn.webb@hardenedbsd.org" target="_blank">shawn.webb@hardenedbsd.org</a>&gt;<br>
&gt; &gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Sat, Jan 20, 2024 at 09:51:25AM -0700, Alan Somers wrote:<br>
&gt; &gt; &gt; &gt; In a recent thread on src-committers, we discussed the costs and<br>
&gt; &gt; &gt; &gt; benefits of including Rust code in the FreeBSD base system.  To<br>
&gt; &gt; &gt; &gt; summarize, the cost is that it would double our build times.  imp<br>
&gt; &gt; &gt; &gt; suggested adding an additional step after buildworld for stuff that<br>
&gt; &gt; &gt; &gt; requires an external toolchain.  That would ease the build time pain.<br>
&gt; &gt; &gt; &gt; The benefit is that some tools would become easier to write, or even<br>
&gt; &gt; &gt; &gt; become possible.  Here is a list of actual and potential Rust projects<br>
&gt; &gt; &gt; &gt; that could benefit from being in-tree.  If anybody else has items to<br>
&gt; &gt; &gt; &gt; add, I suggest moving this into the project wiki:<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Stuff that could only be written in Rust if it were in base<br>
&gt; &gt; &gt; &gt; ===========================================================<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * ctl-exporter (I started this, but discovered that the CTL stats API<br>
&gt; &gt; is<br>
&gt; &gt; &gt; &gt;   unstable, so it can&#39;t live in ports.  Instead, I had to do it in C).<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; <a href="https://github.com/freebsd/freebsd-src/commit/1a7f22d9c211f504f6c48a86401469181a67ec34" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/commit/1a7f22d9c211f504f6c48a86401469181a67ec34</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * fusefs tests.  Absolutely impossible to do in C.  I considered Rust,<br>
&gt; &gt; but went<br>
&gt; &gt; &gt; &gt;   with C++ so they could live in base.  They are too closely coupled to<br>
&gt; &gt; &gt; &gt;   fusefs(5) to live out-of-tree.<br>
&gt; &gt; &gt; &gt;   <a href="https://github.com/freebsd/freebsd-src/tree/main/tests/sys/fs/fusefs" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/tree/main/tests/sys/fs/fusefs</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * devd.  Currently C++, but imp suggested a rewrite.<br>
&gt; &gt; &gt; &gt;   <a href="https://github.com/freebsd/freebsd-src/tree/main/sbin/devd" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/tree/main/sbin/devd</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * zfsd.  Currently C++, but I&#39;ve long pondered a rewrite.  Using Rust<br>
&gt; &gt; would<br>
&gt; &gt; &gt; &gt;   make it more testable.<br>
&gt; &gt; &gt; &gt;   <a href="https://github.com/freebsd/freebsd-src/tree/main/cddl/usr.sbin/zfsd" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/tree/main/cddl/usr.sbin/zfsd</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * nscd.  Currently C, but confusing and with no test coverage.  I&#39;ve<br>
&gt; &gt; &gt; &gt;   contemplated a rewrite myself, but I don&#39;t want to do it in C.<br>
&gt; &gt; &gt; &gt;   <a href="https://github.com/freebsd/freebsd-src/tree/main/usr.sbin/nscd" rel="noreferrer" target="_blank">https://github.com/freebsd/freebsd-src/tree/main/usr.sbin/nscd</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * The userland portion of the 802.11ac and Lightning stacks.  scottl<br>
&gt; &gt; suggested<br>
&gt; &gt; &gt; &gt;   that these were good candidates for Rust.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * freebsd-kpi-r14-0 .  <a href="https://crates.io/crates/freebsd-kpi-r14-0" rel="noreferrer" target="_blank">https://crates.io/crates/freebsd-kpi-r14-0</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Stuff that can live in ports, but would be nicer in base<br>
&gt; &gt; &gt; &gt; ========================================================<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * gstat-rs <a href="https://crates.io/crates/gstat" rel="noreferrer" target="_blank">https://crates.io/crates/gstat</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * geom-exporter (I&#39;ve started this, but haven&#39;t published it)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * nfs-exporter <a href="https://crates.io/crates/freebsd-nfs-exporter" rel="noreferrer" target="_blank">https://crates.io/crates/freebsd-nfs-exporter</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * virtiofsd-rs .  Nobody has yet tried to port it to FreeBSD.  But if<br>
&gt; &gt; the<br>
&gt; &gt; &gt; &gt;   connection to bhyve(8) is too intimate, it might be hard to do in<br>
&gt; &gt; ports.<br>
&gt; &gt; &gt; &gt;   <a href="https://gitlab.com/virtio-fs/virtiofsd" rel="noreferrer" target="_blank">https://gitlab.com/virtio-fs/virtiofsd</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * jail-exporter <a href="https://crates.io/crates/jail_exporter" rel="noreferrer" target="_blank">https://crates.io/crates/jail_exporter</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * Various jail managers have been attempted in Rust.  I think these<br>
&gt; &gt; are fine in<br>
&gt; &gt; &gt; &gt;   ports, but others like Goran Mekic have opined that they should be<br>
&gt; &gt; moved to<br>
&gt; &gt; &gt; &gt;   base instead.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * musikid&#39;s pjdfstest rewrite.  I think it would be great to start<br>
&gt; &gt; using this<br>
&gt; &gt; &gt; &gt;   to test the base system&#39;s file systems.  If the tests themselves<br>
&gt; &gt; lived in<br>
&gt; &gt; &gt; &gt;   base, they would be easier to sync with file system development.<br>
&gt; &gt; &gt; &gt;   <a href="https://github.com/musikid/pjdfstest" rel="noreferrer" target="_blank">https://github.com/musikid/pjdfstest</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * pf-rs.  I suspect that the API isn&#39;t very stable.<br>
&gt; &gt; &gt; &gt;   <a href="https://crates.io/crates/pf-rs" rel="noreferrer" target="_blank">https://crates.io/crates/pf-rs</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * benchpmc.  The pmc counter names changes between releases.<br>
&gt; &gt; &gt; &gt;   <a href="https://crates.io/crates/benchpmc" rel="noreferrer" target="_blank">https://crates.io/crates/benchpmc</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; FreeBSD-related applications that are just fine in ports<br>
&gt; &gt; &gt; &gt; =========================================================<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * fsx-rs.  Unlike pjdfstest, this only tests datapath APIs.  Those are<br>
&gt; &gt; usually<br>
&gt; &gt; &gt; &gt;   more stable than control path APIs, so I think there&#39;s little to be<br>
&gt; &gt; gained by<br>
&gt; &gt; &gt; &gt;   moving this into base. <a href="https://crates.io/crates/fsx" rel="noreferrer" target="_blank">https://crates.io/crates/fsx</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * ztop.  It uses ZFS&#39;s kstats sysctl interface, which is pretty stable.<br>
&gt; &gt; &gt; &gt;   <a href="https://crates.io/crates/ztop" rel="noreferrer" target="_blank">https://crates.io/crates/ztop</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * iocage-provision  <a href="https://crates.io/crates/iocage-provision" rel="noreferrer" target="_blank">https://crates.io/crates/iocage-provision</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * rsblk <a href="https://crates.io/crates/rsblk" rel="noreferrer" target="_blank">https://crates.io/crates/rsblk</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; * xfuse  <a href="https://github.com/KhaledEmaraDev/xfuse" rel="noreferrer" target="_blank">https://github.com/KhaledEmaraDev/xfuse</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Other FreeBSD-related libraries in Rust<br>
&gt; &gt; &gt; &gt; =======================================<br>
&gt; &gt; &gt; &gt; Just see the list at <a href="https://crates.io/keywords/freebsd" rel="noreferrer" target="_blank">https://crates.io/keywords/freebsd</a><br>;
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; One new data point: DARPA is looking to rewrite a significant amount<br>
&gt; &gt; &gt; of C code to Rust with their &quot;Translating All C to Rust (TRACTOR)&quot;<br>
&gt; &gt; &gt; project:<br>
&gt; &gt; &gt; <a href="https://sam.gov/opp/1e45d648886b4e9ca91890285af77eb7/view" rel="noreferrer" target="_blank">https://sam.gov/opp/1e45d648886b4e9ca91890285af77eb7/view</a><br>;
&gt; &gt;<br>
&gt; &gt; Interesting.  And since you bring it up, I have two new data points myself:<br>
&gt; &gt;<br>
&gt; &gt; * ctld: while working on some bugs in ctld, I had trouble<br>
&gt; &gt; understanding the config file parsing.  So I rewrote that part in<br>
&gt; &gt; Rust, just to help my understanding.  Later, I rewrote the XML<br>
&gt; &gt; parsing, too.  Then I rewrote the LUN creation and deletion, just to<br>
&gt; &gt; see how hard it would be.  All of those parts take about 5x fewer SLOC<br>
&gt; &gt; in Rust than in C, and they&#39;re less buggy, too.  Config file parsing<br>
&gt; &gt; is more consistent, no memory leaks, etc.  Alas, I&#39;m not planning to<br>
&gt; &gt; finish this project, since the base system doesn&#39;t allow Rust and ctld<br>
&gt; &gt; is too tightly coupled to ctl to live in ports.<br>
&gt; &gt;<br>
&gt; <br>
&gt; Cool. Still waiting for anybody to take me up on the offer to do build<br>
&gt; system integration. Since the Rust advocates can&#39;t get even this basic step<br>
&gt; done for review, it&#39;s going to be impossible to have Rust in the base. This<br>
&gt; isn&#39;t even integrate rust compiler like we do with llvm, but with external<br>
&gt; Rust toolchain.<br>
&gt; <br>
&gt; Until somebody steps up for this task, the status quo can&#39;t possibly change.<br>
<br>
Back at the FreeBSD Developer Summit at this last BSDCan, there was<br>
interest in supporting optional external toolchains in the src build<br>
framework. You had mentioned you would be happy to mentor someone, but<br>
not do the nitty gritty yourself.<br></blockquote><div><br></div><div>Yes. I&#39;ve made that offer half a dozen times now.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I could carve off some time in September to be the primary developer,<br>
doing the nitty gritty work. Would you be comfortable answering my<br>
questions, should I have any?<br></blockquote><div><br></div><div>You bet. I&#39;d love to see progress made on this front. But I&#39;m in Ireland</div><div>on vacation half the month, so there may be timing issues. Other than that,</div><div>I&#39;m happy.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also: what work (or research), if any, has been done on the concept of<br>
external toolchain support for optional components in the FreeBSD<br>
source tree? Am I starting afresh or building upon existing work?<br></blockquote><div><br></div><div>We already have clang and gcc external tool chains, so there&#39;s a proven</div><div>mechanism for that. But there&#39;s not a good notion of the concept &quot;I have</div><div>a rust compiler&quot; or &quot;I depend on rust&quot;. And there&#39;s no concept of crates</div><div>or similar that rust programs use, but that will be one thorny area that</div><div>we&#39;ll have to design for. Do we just pull them in and junk any notion of</div><div>a reproducible build for these components into the future (since any crate</div><div>can go away), or do we have a way to build up our own set of crates</div><div>in the tree that the optional components depend on. How do we do change</div><div>management on that if we have multiple programs that depend on a crate</div><div>that&#39;s updated? how do we keep things fresh while not having update</div><div>cascades be too burdensome a task. How does this tie into pkgbase?</div><div><br></div><div>These are the things to think about. We don&#39;t need to solve all of</div><div>them, but the Rust ecosystem is quite a bit different than the C ecosystem</div><div>in the details of a number of these points, so we have to address them</div><div>if we want to use Rust in base with the same traits as all the other bits</div><div>in base today (or we need to have a thoughtful discussion on paradigm</div><div>shift and settle on that). To my thinking, pkgbase might be a good way</div><div>to segregate crates that are build from the base tree and express dependencies</div><div>on optional components that use it, and have the ultimate dependency</div><div>be a pkg from ports. <br></div><div><br></div><div>These questions and design points aren&#39;t hard and aren&#39;t designed to</div><div>block anything, but a bare minimum of what we need to articulate is the</div><div>vision for these components. Likely a design document that spells these</div><div>out in some degree of detail (or that we punt in this phase) would be good</div><div>as well. I can help with that as well.<br></div><div><br></div><div>Warner<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
<br>
-- <br>
Shawn Webb<br>
Cofounder / Security Engineer<br>
HardenedBSD<br>
<br>
Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50<br>
<a href="https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc" rel="noreferrer" target="_blank">https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc</a><br>;
</blockquote></div></div>

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