Back

Systemd adds support for Rust
SiTech AI Team2 min read

Systemd adds support for Rust

Systemd 263 development now includes Rust support for new leaf components, built with Meson and without the standard library, while existing C code stays in place.

Systemd 263 is gaining Rust support after developer Christian Brauner announced on Mastodon that his new feature has been merged. The change allows new leaf components to be written in Rust, while existing C code remains in place and nothing that other components depend on is written in Rust.

What changed

The previous effort has now been split into five separate parts. Part 1 contains keyring-util and voa-util, described as helpers for enrolling certificates into kernel keyrings. Part 2 adds support programs written in Rust. The remaining parts bind only the headers Rust code uses, wrap the libsystemd-shared helpers systemd-keyring-setup needs, and add systemd-keyring-setup.

Build rules

Rust is only used for new leaf components. Existing C code is not ported, and nothing that other components depend on is written in Rust. There is no Cargo; everything is built with Meson, which systemd already uses. Meson is also used extensively by the GNOME project and the Mesa 3D graphics library, is written in Python, and uses Ninja. Ninja was designed to build Chrome faster and is also used for Android. Rust code must not use the standard library, a requirement described as normal for embedded Rust programming.

Requirements and limits

The project requires Rust version 1.85 or later, bindgen version 0.71.1 or newer, and Meson 1.4.0 or newer. Rust 1.85 was released in February 2025, Rust 1.99.1 appeared earlier this month, bindgen 0.71.1 came from December 2024, and Meson 1.4.0 came from March 2024. These are relatively old versions, and the Meson version is the one included in Debian 13. Brauner said the team would have liked Rust support in the core of systemd, but Rust's support for dynamic libraries is not quite there yet. Writing systemd modules in Rust is separate from calling systemd from Rust code, and tools such as the systemd crate have existed since 2015.

Sources: The Register

SiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.