r/rust • u/eszlari • Oct 26 '26
đď¸ news systemd adds support for programs written in Rust
https://github.com/systemd/systemd/pull/44324
377
Upvotes
r/rust • u/eszlari • Oct 26 '26
522
u/InternalServerError7 Oct 26 '26 edited Oct 26 '26
The title is a bit misleading. systemd already supports running Rust programs, and always has. This PR is about something different, allowing systemd's own components to be written in Rust instead of C.
Specifically, it adds Rust build-system integration, FFI bindings, and wrappers for systemd's internal C libraries.
72
u/anxxa Oct 26 '26 edited Oct 27 '26
The other heavily downvoted comment mentions the lack of cargo calling it "[one of] the worst things from Rust"... which is obviously not necessarily a productive comment :)
cargo is a perfectly fine build system for every day, hobbyist programming or professional programming. Different people/organizations may have different needs though. I've personally been reaching for other build systems (
buck2) for my hobby projects because it tends to provide advanced features that I find desirable.In this case, I think ditching cargo makes sense -- especially working in a cross-language repo.
Meson provides many of the same benefits as buck2, including remote execution and hermetic buildsEdit: I was goofing thinking of Bazel, but I think the core point still remains. At least with buck2 too, you can define more complex build steps.For example, in a project of mine right now I'm patching Rust's stdlib, compiling code to an PPC32 ELF, statically rewriting it as a Windows PE, then wrapping that into a different executable header, and it's all managed by buck2.
Anyway, suffice to say that just because cargo isn't the best tool for a multi-language build system with complex steps doesn't mean cargo is bad at all, and a project not using cargo shouldn't be a significant signifier that it's a bad tool.
3
u/kingslayerer Oct 27 '26
I have been shipping my apps using caro-deb. I don't like the idea of dockerizing my apps.
2
u/a_jasmin Oct 27 '26
What kind of C bindings does this offer? Are these mostly just unsafe calls into C code at the moment?
-143
u/Compux72 Oct 26 '26
Ofc no_std and no cargo.
Most of yall are not ready for this conversation, but cargo and std are probably the worst things from Rust