Urgent.News

What's breaking now, across thousands of outlets.

Tech

Systemd adds support for Rust

What's even better than Rust in the Linux kernel? Rust in systemd!

Systemd adds support for Rust

The widely-used Unix init system, systemd, has introduced support for the popular Rust programming language. The initiative was initiated by developer Christian Brauner, who announced the development of systemd version 263 with the new feature on Mastodon. The previous pull request (#44144) was divided into five distinct components, with part 2 being the most significant one, which introduces Rust support.

The announcement indicates that Rust will be utilized for new components, but existing C code won't be converted, nor will any dependencies of other components be written in Rust. More importantly, this development does not signify the beginning of an effort to rewrite the entire systemd in Rust.

The second bullet point is also noteworthy, stating that all code will be built using Meson, which is already the preferred build system for systemd. Additionally, any Rust code developed must refrain from using the standard library. This requirement is more common in embedded Rust programming and necessitates Rust version 1.85 or later, along with Bindgen version 0.71.1 or newer and Meson version 1.4.0 or newer.

Brauner expressed that it would have been ideal to support Rust in the core of systemd, but the current limitations in Rust's support for dynamic libraries hindered this. It's essential to note that this development allows the creation of systemd modules in Rust, rather than calling systemd from Rust code. Several tools for this purpose have been available for years, such as the systemd crate, which was first released in 2015.

Written by urgent.news from The Register's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at theregister.com →

More in Tech

More from Thursday 29 October →