Re: The Case for Rust (in the base system)

From: Alan Somers <asomers_at_freebsd.org>
Date: Sun, 21 Jan 2024 16:40:03 UTC
On Sun, Jan 21, 2024 at 9:26 AM Poul-Henning Kamp <phk@phk.freebsd.dk> wrote:
>
> Alan Somers writes:
> > * "<something> can't be implemented unless written in rust"
> >
> > I don't think anybody has claimed this yet.  But I _have_ made a similar claim,
> > that some things can't be written in C.  I'll elaborate on the project that
> > started this thread: the fusefs test suite.  When I designed the fusefs test
> > suite, I based it around the priniciple of Mocking. [...]
>
> Why would such a test-tool live in src rather than ports ?

I initially considered putting it in ports just for that reason.  But
it's too tightly coupled to src.  The tests need to change with every
feature addition or bug fix to src.  If the tests lived in ports, then
they would have to be aware of all of the differences between main,
stable/14, stable/13, releng/13.2, etc.  Updates to src would have to
be synchronized with updates to ports, and the package builders
introduce a few days' lag.  I thought that synchronization effort
would be too great.  That's why I put the tests in src and used C++.