EEE
The systemd project has officially introduced support for developing programs in Rust, following the merger of a pull request submitted by Linux kernel developer Christian Brauner. The change, merged into the project’s main branch, establishes a new development option for systemd while keeping its existing C-based architecture intact.
And before anyone assumes systemd is preparing a complete rewrite in Rust, that’s not the case. The maintainers agreed on a deliberately limited approach: Rust may be used only for new, standalone components that other parts of systemd do not depend on. Existing C code will remain untouched.
Another important decision concerns the build process. Rather than introducing Cargo, Rust’s standard package manager and build tool, systemd continues to use Meson for all builds. This keeps Rust development integrated into the project’s existing build infrastructure.
The implementation also places strict limits on dependencies. Rust programs use the no_std approach, meaning they do not rely on Rust’s standard library or external third-party crates. Instead, they interact with systemd’s existing C libraries through generated bindings.
For memory management, systemd provides its own Rust implementations of common container types, with allocation failures handled explicitly rather than causing the program to abort. The new infrastructure also includes wrappers for logging, command-line argument handling, event processing, and error management, allowing Rust utilities to behave consistently with their C counterparts.
Rust support is optional and automatically detected during configuration. Developers wishing to enable it need Rust 1.85 or later, bindgen 0.71.1 or later, and Meson 1.4 or later. Systems without the required toolchain can continue building systemd without Rust support.
Interestingly, initial tests show that a stripped Rust command-line utility occupies about 32 KB, compared to 20 KB for its C equivalent built with link-time optimization. This gives an early indication of the additional overhead, though the comparison involves only a small test program.
The first planned real-world application of this infrastructure is systemd-keyring-setup, a new utility intended to help manage certificates in Linux kernel keyrings. Its implementation is being developed separately, alongside additional Rust wrappers for systemd’s shared libraries.
For Linux distributions, the change introduces packaging considerations. Builds that enable all available features will need the appropriate Rust compiler and bindgen dependencies or must disable Rust support to avoid build failures.
Whether Rust becomes widely used within systemd will depend on future development, but the necessary groundwork is now in place.



It’s not about the popularity…
You also said earlier that it’s not about it stopping anyone from using rustc only.
So honestly, I don’t understand what is the problem. People can (and do) use rustc without cargo, and make projects with zero dependency… so I don’t get why you say that “nobody” would want to do that. There’s people doing it. Like the Linux devs.
The only thing I can think of is that you think that “most” people don’t want to do that… but then that would mean you are talking about popularity (ie. what the mainstream people do, what is the most widespread).
What? I’m actually saying the opposite, not that nobody wants to do it. Otherwise why would I suggest it. I am saying its not widespread adopted, and you cannot expect OTHERS to have rustc+stdlib to be installed on the system, like a standard Linux tool. People use it for their specific use cases, like Linux, but its not something you can expect on other machines.
Imagine rustc+stdlibs were available by default like Python, ideally installed on default. Maybe not installed on default, depending on the system you are, but everyone should expect this package with the stdlib on be available.
You literally said “nobody will target it and everyone assumes Cargo.”.
We know that there’s people who target it… so the only way I can interpret “nobody will target it” is that you are saying that people are generally not interested in using rustc on itself because cargo is there.
And yet, what I’m saying is that there’s people that are actually interested still in doing that, and they actually do it, regardless of whether cargo is there or not. Cargo being there is not an obstacle for them.
Sure, those people might be a minority, but you said that it’s not about popularity… so what is it about?
Even gcc is not preinstalled in most distros. The reason python is preinstalled is because it’s an interpreter, so it’s required at runtime, you need it to run the programs. If python was a compiler then it wouldn’t be preinstalled by default since the end users wouldn’t need it.
And that’s completely unrelated to cargo… one could argue that there’s just as much reason to include cargo preinstalled too if you were to pre-install rustc.
Maybe the problem is that you think that rustc is an interpreter? it’s not, it’s a compiler, you don’t need others to have rustc, they can run programs made with rust without needing to have rust installed in their system (it’s not something you “target” in that sense). That’s not the case for python, so that’s why python comes already installed, specially given that many distros depend on python for some config tools.