systemd, the foundational init system and service manager utilized by the vast majority of mainstream Linux distributions, has officially merged support for writing its native programs in Rust. The integration landed on the project’s main branch through a substantial pull request comprising 19 distinct commits. This significant development replaces an earlier, preliminary proposal and follows carefully deliberated rules and guidelines agreed upon by maintainers during a recent project hackfest held in Berlin.
The introduction of Rust into the systemd codebase represents a pivotal moment for core Linux infrastructure components. For years, systemd has been written almost exclusively in C, serving as the central orchestrator for initialization, service management, and system state supervision across modern Linux environments. By opening the door to a memory-safe language like Rust, the project is taking calculated steps toward enhancing long-term security and robustness without sacrificing the performance and reliability expected from system-level software.
The very first program to leverage the newly introduced Rust integration is systemd-keyring-setup. This specific utility plays a critical role during the early stages of a system’s boot process by adding X.509 certificates to kernel keyrings—such as those utilized by dm-verity and fs-verity—before locking down the environment. By implementing this functionality in Rust, the project aims to minimize memory safety vulnerabilities in critical attack surfaces that handle cryptographic certificates and secure boot verifications early in the boot sequence.
Rust, but on systemd’s terms
Despite the excitement surrounding memory-safe languages in systems programming, the integration of Rust into systemd has been approached with a high degree of pragmatism and stringent technical boundaries. The strategy adopted by the maintainers ensures that Rust remains entirely optional, meaning that systemd can still be successfully built and deployed without requiring a Rust toolchain.
To maintain strict control over the codebase and build process, the scope of the Rust code is strictly limited to new, standalone programs that have no downstream dependencies. Furthermore, everything within the build system continues to rely on Meson, effectively excluding Cargo from the core build pipeline. To keep binaries lean and compatible with systemd’s strict architectural requirements, only the core and libc crates are permitted. This explicit policy completely rules out the standard library and the alloc crate, requiring developers to utilize systemd’s own internal Box and Vec data structures instead.

Under this architecture, a failed memory allocation returns a controlled error rather than triggering a panic, mirroring the defensive programming style long practiced in systemd’s C codebase. Additionally, any new Rust-based program must behave identically to its C counterparts. The project enforces this through automated testing that verifies equivalent execution and behavior for programs that declare the same command-line interface or operational logic.
For developers and system administrators wishing to build systemd with these new features enabled, specific toolchain versions are required. The build environment must include rustc version 1.85, bindgen version 0.71.1, and Meson version 1.4.0 or newer. Consequently, upstream distributions and rolling-release environments that compile systemd with every available feature enabled—such as Arch Linux and the openSUSE Build Service (OBS)—will need to ensure their build environments include the appropriate Rust toolchain or explicitly configure their packaging scripts to handle the optional support.
A major architectural hurdle remains the project’s shared library, libsystemd-shared, which is consumed by numerous systemd binaries. For now, this shared library will remain written in C. Transitioning a shared library of this nature to Rust requires robust, native shared library support from Rust itself—a capability that continues to be complicated by the fact that the Rust language still lacks a stable Application Binary Interface. Translating the shared library into Rust at this stage would likely force unnecessary code duplication across the library and various systemd binaries.
Filesystem access presents another unique challenge for the project. systemd traditionally looks up filesystem paths strictly through file descriptors to maintain a high level of security and isolation. Because of this design choice, the project does not currently accept Rust’s standard path-handling mechanisms for its most sensitive security-critical components, expressing a desire for future Rust language developments to better support descriptor-based path resolution. Despite these current limitations, systemd maintainers have made it clear that they remain open to working closely with the broader Rust community to address these architectural hurdles and eventually expand Rust’s footprint within the core of the project.
A wave of rust across the Linux ecosystem
The integration of Rust into systemd does not happen in a vacuum; it is part of a much broader, industry-wide shift as major components of the Linux software stack actively make room for memory-safe languages. This progressive adoption reflects a growing consensus among core developers that modernizing system components can significantly reduce whole classes of security vulnerabilities related to memory management.

Most notably, memory safety found its way directly into the mainline Linux kernel starting with version 6.1 as an exploratory initiative. Following years of evaluation and collaborative development, kernel maintainers officially declared late last year that the initial experiment was a success, paving the way for more comprehensive Rust integration within kernel subsystems and device drivers.
At the distribution level, major operating system vendors are adopting similar modernization strategies for their essential user-space utilities. Canonical’s Ubuntu has steadily integrated memory-safe alternatives into its core operational toolchain, highlighted by the adoption of sudo-rs and the uutils coreutils implementation as default experiences in recent development cycles.
These concurrent developments across the kernel, core utilities, and now initialization systems strongly indicate that the adoption of Rust within the open-source infrastructure space will continue to accelerate as the software community moves forward.