
As of today in systemd Git it's now possible for the systemd programs to be written in the Rust programming language as an alternative to C.
Core systemd code like the systemd library doesn't yet support Rust code, but for the various systemd programs / leaf components is now support for using Rust. That's Rust without Cargo. For Rust in core systemd code, there are some Rust blockers that would first need to be resolved.
This Rust support for systemd began with a new component, systemd-keyring-setup, being written in the Rust programming language. The new systemd-keyring-setup utility in Rust is used for provisioning keyrings and enrolling X.509 certificates into the kernel's dm-verity / fs-verity / BPF keyrings during the boot process while dealing them afterward.
This systemd-keyring-setup code hasn't been merged yet but expected soon now that the Rust infrastructure has landed. Originally it was all part of a single big commit before being split-up for the Rust enablement, systemd-keyring-setup, and other preparations for this new component.
Systemd developers aren't planning on porting existing C code to Rust, all the Rust code is built with Meson and no Cargo usage, and C linkage only is mandated.
Systemd Rust components come out slightly larger than C with a test program being 32KB compared to 20KB for its C twin. For now at least the systemd Rust support is optional and toggled by the -Drust= Meson option with it being auto by default.
More details on this support for Rust programs in systemd can be found via this pull request merged for what will eventually become systemd 263.