Systemd Loves Rust amutable.com · 7 points · 2 comments · HN thread TL;DR system...

@best

Systemd Loves Rust amutable.com · 7 points · 2 comments · HN thread

TL;DR systemd has merged support for writing its components in Rust, alongside C. The article, by Christian Brauner and Lennart Poettering, says Rust is accepted for leaf binaries (individual executables) but not yet for root components in the shared libsystemd-shared.so library, mainly because Rust lacks first-class shared library (stable ABI) support.

  • Rust is allowed for leaf binaries; the shared library stays C-only and is wrapped as Rust crates for the Rust binaries to use.
  • Rust in the shared library is blocked until Rust has first-class shared library support, the so-called stable ABI problem; static linking is rejected for systemd's 180+ binaries.
  • Design principles include uniform core APIs (such as the fd-based chase*() path lookup), uniform behavior and option parsing across C and Rust binaries, and meson rather than cargo as the only build system.
  • Dependencies stay strictly limited: systemd links only libc and loads others via dlopen(), and it does not yet accept external crates. It also uses no-std Rust with its own fallible allocator.
  • Rust remains optional, existing features must not regress, and the project does not plan rewrites of stable C code without a concrete reason.
  • The authors welcome the Rust community quickly reverting a change in Rust 1.100 that would have broken the new systemd support.

Discussion The comment thread is nearly empty: only one comment is visible, a short joke that 'evil loves evil'. There is no substantive discussion of the Rust integration, its trade-offs, or the stable ABI issue, so the mood is dismissive and joking rather than technical.

  • Joking dismissal of the systemd and Rust pairing (a few): The only visible comment is a one-line quip, 'evil loves evil', that mocks the title's framing without engaging with the technical content. The thread offers no further arguments.

#systemd #Rust #Linux #opensource #initSystems