Menu

Linux officially gains support for the Rust language in systemd
📰

Linux officially gains support for the Rust language in systemd

DEV Community: rust·Hacks.gr·2 days ago
#y5A5ueys
#devtorust#devto#dev#rust#code
Reading 0:00
15s threshold

The systemd project officially introduced support for writing new, standalone components in Rust.

Existing C code remains untouched, and the build process continues to use Meson rather than Cargo.

New Rust code uses a no_std approach with custom generated bindings.

No changes to the old code

Despite this addition, there is no intention to rewrite the entire systemd from scratch in the new language. The developers have decided to take a limited approach. Rust will be used exclusively to create new, self-contained parts that do not depend on the rest of the program. All the old code written in the older language remains intact.

Furthermore, the process of building the program remains the same. Instead of using the standard Rust tool, the process continues to be done with the Meson tool, so that it integrates smoothly into existing infrastructures.

How the new code works

The new Rust code follows library restrictions, avoiding the language's standard library and external plugins.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.