Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jan 2024 11:46:21 +0100
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Alan Somers <asomers@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>, Warner Losh <imp@bsdimp.com>, Scott Long <scottl@freebsd.org>, meka@tilda.center
Subject:   Re: The Case for Rust (in the base system)
Message-ID:  <9b55eb431b63e1df4c66063bfcc5fe33@Leidinger.net>
In-Reply-To: <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com>
References:  <CAOtMX2hAUiWdGPtpaCJLPZB%2Bj2yzNw5DSjUmkwTi%2B%2BmyemehCA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)

--=_f99ee8ff2686ec6bd37d21af7ac02008
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII;
 format=flowed

Am 2024-01-20 17:51, schrieb Alan Somers:
> 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.

In case we allow more than C/C++ into the tree, but no matter if via 
external or internal toolchain: Currently we are proud that we are able 
to build rather old code on recent releases and we are even working on 
this kind of backwards compatibility to some extend (e.g. building the 
oldest supported release on the most recent in-development version).

Which impact would any of the proposals have in this regard?
To my current understanding of the thread, an external toolchain may 
result in losing this backwards compatibility even during the lifecycle 
of a release (could I compile FreeBSD x.0 2 years later on x.y, or can I 
compile x.y on x.0). This may be fixable (by having more than one rust 
compiler in the ports tree, and sticking with a specific one for a given 
release branch), but needs to be discussed / taken into account.

As a generic voice of opinion: I agree with Warner Losh that providing 
the possibility to play around and learn in a way which doesn't get into 
the way of the functionality which we provide currently is a good first 
step into getting hard factual data about possible benefits. I also 
agree with David Chisnall that some "renovation" would be good in the 
long term, and that current technologies provide ease of use not only in 
security related but also in code quality and quality assurance related 
areas compared to C. Not in terms of "we need to rewrite", but in terms 
of "we need to provide the possibility to be able to make use of it". In 
that regard it may be nice to set up some guidelines, e.g. if you use 
C++, the target shall be C++17 / smart pointers / ... whatever (just to 
use some words as examples which came up in this thread, not as a 
suggestion that I want to have this written down as a rule), and if you 
use Rust, you shall do X and Y, and if you use lua, do Z, if you use 
python, ... So some kind of what we have for style but in terms of 
coding guideline.

Bye,
Alexander.

-- 
http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF
http://www.FreeBSD.org    netchild@FreeBSD.org  : PGP 0x8F31830F9F2772BF

--=_f99ee8ff2686ec6bd37d21af7ac02008
Content-Type: application/pgp-signature;
 name=signature.asc
Content-Disposition: attachment;
 filename=signature.asc;
 size=833
Content-Description: OpenPGP digital signature

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmWvmQ4ACgkQEg2wmwP4
2IZTIxAAl59x4NQqrrSsMduGtYAfPogJgrzDiZ84jqwlvGsG245aeh7ULLSXRqq+
LQSTU0RZ3Ay/yyv4lmlTccMH00aYKsGR5D299mFtdeoq3NtY0Hdo+4I07CKVizXW
7DBYIMTdfjC4Kw8+SpxNOUF2tnFIlqN+12jQhGB6ptUzstF+BZABBSdyyJ61yutw
7ZUwKVa/yyohIPS3jS1orGGpiz2g4ROXAotuptgn1p1JEOAKhaAYoY12SJlPht6B
0AXtXReNPtvBVBrgmbqsOpW6hNS9oltOtZ7zI8aBdVYnO0PYL5INn/D5ERsqS1qJ
iXr3dKeIOpxA2V44fQ9B+T5/9Svr18T00tupPhTg1DYrKc41JQsqIbYBaoDDSeNA
SeNJLJZC7X3cJaKa0GCpAKB/LinpmXAW7fvfkmqOLNsZSZAevJIBdWIEjAwEAOO0
Ibg3iY3rJvd3MPFxXK1hUApC87sLsBhns+4a7TeypVr7RMsMmaLPinIekVhHi/EW
n8JW3qu3lTA7MZQZgvhnBcqscHNJP25j5b49YYuJ6yu4ka17WwOky8z9O/i9ChNg
qOJ7Oj+9nCoU57zZgDzzFJlovHrAILPNGEx/E5Klg9SlnCy7K+Durt6jWKsk3kTd
bCIRLo8C1mzbEOY9bTbTNIfu5ujeGOMEckpLZtQb5mLay55RVtU=
=uN+h
-----END PGP SIGNATURE-----

--=_f99ee8ff2686ec6bd37d21af7ac02008--



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