# systemd introduces support for Rust-based programs

> **Key takeaway:** systemd now allows leaf components and utilities to be written in Rust using Meson instead of Cargo.

**Published:** 2026-10-24T11:11:00+00:00 
**Source:** Phoronix Benchmarks &amp; Drivers 
**Category:** kernel-os 
**Canonical URL:** https://fosswire.org/news/systemd-introduces-support-for-rust-based-programs.html 

## Summary
The systemd project has merged infrastructure into its Git repository to allow new programs to be written in Rust as an alternative to C. While core libraries remain in C for now due to existing technical blockers, new leaf components like the upcoming systemd-keyring-setup will utilize Rust. This implementation avoids the Cargo package manager, relying instead on Meson and C linkage to maintain system integration.

## Technical implementation of Rust in systemd
- **Build System:** Rust components are built using Meson rather than Cargo, and only C linkage is mandated to ensure compatibility.
- **Scope of Support:** Support is currently limited to leaf components and utilities; core systemd libraries are not yet compatible with Rust due to unresolved blockers.
- **Initial Use Case:** The first planned component is systemd-keyring-setup, a utility for provisioning keyrings and X.509 certificates into kernel dm-verity, fs-verity, and BPF keyrings.
- **Binary Size:** Rust-based binaries are slightly larger than their C counterparts, with a test program measuring 32KB compared to 20KB for the C version.
- **Configuration:** The feature is optional and can be toggled via the -Drust= Meson option, though it is set to auto by default.

## Why it matters
This move allows systemd to gradually adopt memory-safe programming practices for new utilities without rewriting the entire core. It sets a precedent for how critical Linux system components can integrate Rust while maintaining strict build requirements and minimizing dependency overhead.