Developers overwhelmingly reject “Rust for FreeBSD’s base system.”

The FreeBSD mailing list “freebsd-hackers” is currently discussing a suggestion from one of its developers to convert parts of the FreeBSD code in the base system to Rust. But the chances of this seem slim.

Advertisement

A few days ago, FreeBSD developer Alan Somers suggested on the FreeBSD Hackers mailing list that parts of FreeBSD’s base system should be rewritten in the Rust programming language instead of C/C++. In his opinion, this should eliminate problems during development, as some components would be easier to program – or it would be possible to develop certain parts in the first place. After “buildworld”, which is used to compile the FreeBSD base system, all that is necessary is another compiler run with the Rust compiler.

Somers provides a list of components, which he believes would benefit from Rust. This includes:

  • ctl-exporter: Exports FreeBSD system statistics for use by monitoring tools.
  • fusefs tests: Unit tests for the implementation of the virtual file system FUSE (Filesystem in Userspace).
  • devd: Dynamically manages device nodes based on existing hardware and its configuration.
  • zfsd: Primary daemon for the ZFS file system, handling tasks such as metadata management and I/O operations.
  • nscd: Name Service Cache Daemon that caches DNS and NIS (Network Information Service) calls for faster access.

He also mentions components of the 802.11ac and Lightning stacks that run in user space, i.e. drivers and utilities for managing wireless network interfaces. Even the kernel programming interface (KPI) for FreeBSD version 14.0 (freebsd-kpi-r14-0), which allows user space programs to interact with the kernel, is said to benefit from Rust.

As a disadvantage, the entire Rust ecosystem including all dependencies would have to be available for the base system, the time for a compiler run would at least double and FreeBSD would probably no longer be able to be translated natively on weaker architectures such as the Raspberry Pi.

By Thread “The Case for Rust (in the base system): Alan Somers” There is currently a lively but constructive discussion about this on the FreeBSD mailing list. FreeBSD veterans like Poul-Henning Kamp are critical of the proposal because it neither contains concrete code examples nor explains what exactly is supposed to be improved by using Rust. With Rust you get a gigantic ecosystem including – to put it cautiously – a fluctuating ABI as well as the crates.io package system into the base system, where such complex tools don’t really belong – even if they are “cool”. According to some comments in the thread, it seems to be mostly Rust developers who want to see Rust in FreeBSD, not the actual FreeBSD developers.

There have been and are always attempts to bring the need for a programming language into the base system of FreeBSD, for example Java and Perl. Perl, for example, was thrown out again because the Perl modules caused huge problems; something similar is feared with the Rust Crates. Even Modula-3 (with sample code for CVSUP) or Haskell were suggested and rejected.

FreeBSD is a conservative operating system, but still open to other programming languages ​​when it makes sense. The ancient FORTH, for example, is still used for parts of the loader because it produces tiny code. But here you will find one Migration towards Lua takes place.

Even though Rust enthusiasts in some forums and comment sections of news sites aggressively attack anyone who rejects Somer’s proposal, the chances of the change are very slim. Overall, migration to Rust is a big topic in the open source world. The programming language has already found its way into prominent projects such as Linux and Android. The most recent example of discussions about possible Rust use is Git. Even Microsoft has released a number of Rust packages as open source on GitHub, which can be used to write Windows drivers in the language.


(axk)

To home page

source site