Re: The Case for Rust (in the base system)
- Reply: Alan Somers : "Re: The Case for Rust (in the base system)"
- In reply to: Alan Somers : "The Case for Rust (in the base system)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 23 Jan 2024 10:46:21 UTC
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