systemd opens the door to Rust, but only for new standalone tools

systemd, the init and service manager at the heart of most Linux distributions, has merged optional support for writing new programs in Rust. The change, a pull request by Christian Brauner merged into the main branch on 24 October, is deliberately narrow: Rust is allowed only fo

systemd opens the door to Rust, but only for new standalone tools

systemd, the init and service manager at the heart of most Linux distributions, has merged optional support for writing new programs in Rust. The change, a pull request by Christian Brauner merged into the main branch on 24 October, is deliberately narrow: Rust is allowed only for new, standalone “leaf” components that nothing else in systemd depends on, and the existing C code is not being ported. The guardrails matter for anyone packaging or building systemd. Rust code is no_std with no third-party crates, builds stay on Meson with no Cargo, and programs use C linkage and link libsystemd-shared dynamically. Support is controlled by a -Drust= option that defaults to auto-detection and needs rustc 1.85+, bindgen 0.71.1+ and Meson 1.4+; cross-compilation is not yet supported. The PR adds only test programs for now, with a keyring-setup utility being developed as the first intended user. For teams building custom images or distro packages, the practical takeaway is to add the Rust toolchain to build environments, or explicitly disable the option, before the first Rust-based tool ships.

This is a summary by our content curator. Read the original at systemd on GitHub: https://github.com/systemd/systemd/pull/44324.