Systemd Merges Support for Rust Programs (phoronix.com) 42
"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," reports Phoronix:
Core systemd code like the systemd library doesn't yet support Rust code, but for the various systemd programs / leaf components there is now support for using Rust... 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 is 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 [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.
Systemd developers aren't planning on porting existing C code to Rust, all the Rust code is built with Meson [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.
This will certainly be great discussion (Score:2)
I look forward to a mature discussion about what this might mean as opposed to 400 comments all talking about how much they hate systemd and it is the devil.!
Re: (Score:2)
Re:This will certainly be great discussion (Score:4, Insightful)
Re: (Score:2)
SystemD isn't a monolithic application. It's a collection of utilities that all share the SystemD banner. You can pick and choose what bits of the SystemD utility set you wish to use. It is entirely possible to not use the init portion but use the system logging daemon, for example. Or other bits and pieces.
In fact, there's no distribution out there that uses everything SystemD has to offer. Most use a majority of the components, but there's often a few that are not used. systemd-networkd versus Network Man
Re:This will certainly be great discussion (Score:5, Insightful)
Re: (Score:2)
Yes, because being declarative about your dependencies is terrible. I'd much rather have the complexity of making sure that crons fire in order, on a timer, instead of being event-driven and declaring everything it needs.
Re: (Score:2)
I was honestly surprised to see this myself. Regardless of its reputation for being more monolithic than classic init systems it still is, and has to be, capable of interacting with basically any flavor of ser
Re: (Score:2)
SystemD isn't a monolithic application. It's a collection of utilities that all share the SystemD banner.
It's a bunch of utilities that depend on the same libraries and one another, you cannot just separate out any pieces you want and use them independently, some of them come in packs and using one implies using the next, or having a real bad time. That is the root of the complaint about systemd not following the Unix way.
Heck, I think there was one now-deprecated component of KDE that was dependent on one SystemD utility that was Linux-specific. It got dropped over a more generic version that used more portable components.
Yes, the KDE devs are smarter and more competent than the GNOME devs.
Re: (Score:2)
> you cannot just separate out any pieces you want and use them independently,
Except when you can, which is most of the time. Grow up.
Re: (Score:2)
SystemD isn't a monolithic application. It's a collection of utilities that all share the SystemD banner.
Literally every monolith ever is a collection of smaller parts.
Your example proves you don't understand monoliths. For example, it is perfectly possible to use Google Maps without using Google search, even though they are both part of the same monolith. "using" and "not using" aren't what determine a monolith. What determines a monolith is improper separation of concerns, and that is a design mistake made by systemd.
Systemd is a monolith.
Re: (Score:2)
I'm not really qualified to deliver a good holy war; but it does seem like there may be something to the criticism that monolithic integration has gone a bit far if supporting one utility being written in a different language is a special feature rather than a matter of the rest of the system not knowing or caring what is on the opposite side of an interface so long as it can act as expected.
The summary isn't clear on this. I also initially thought that it was talking about programs written in Rust and being managed by systemd's init/service management. But that can't be what's now supported, because systemd should be able to launch anything that's executable (any compiled binary, shell or Python scripts, etc.). So my guess is that this is some kind of systemd library that now has a Rust version.
Re: (Score:3)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
It's not the devil; it's just garbage and is only used by inferior people who don't know any better -- and are too lazy to learn. In that sense it's useful: it allows us to easily identify the incompetent and stupid, which is why I use it as an interview question. (Seriously. It's just one in a list, and it's not the first or last, so there's no particular indication that it's a key. Of course I permanently reject any applicant who answers it incorrectly, but one thing I've noticed is that these people also tend to be seriously lacking in other areas as well. For example, a couple of months I interviewed someone who considered themselves a senior Linux expert but couldn't write a single line of awk(1) -- which is pathetic. I didn't hire them but I did recommend some remedial reading to them in the hopes that they might invest some minimal effort in self-improvement.)
That my good man, is some worthy trolling. Well played indeed!
Well, that's a nonstarter (Score:2)
Systemd Rust components come out slightly larger than C with a test program being 32KB compared to 20KB for its C twin
Who's going to be able to scrounge up an extra 12KB of RAM in today's market?
Re: (Score:3)
Systemd Rust components come out slightly larger than C with a test program being 32KB compared to 20KB for its C twin
Who's going to be able to scrounge up an extra 12KB of RAM in today's market?
Most things expand [wikipedia.org] when they rust. :-)
Re: (Score:3)
Who's going to be able to scrounge up an extra 12KB of RAM in today's market?
That was just one single test program of only 20 KB. Extrapolate that out and it's significant.
Re: (Score:2)
Re: (Score:2)
As we all know, software definitely scales on a linear track. Every time.
Re: (Score:2)
Slightly larger (Score:2)
32KB compared to 20kb
That's more than 50% larger for that one test program. I don't consider a 50% increase "slight". Maybe a 10% increase can be considered slight, but that much difference is significant. Especially talking about embedded systems and the like.
Re: Slightly larger (Score:2)
I wonder if it's 50% larger or 12kb flat overhead.
The data from a single component 2 orders of magnitude smaller than typical isn't so useful.
Adding even greater insult to the systemd fallacy. (Score:2)
My AI overlords will eat your Rust slop for breakfast!
I hate SystemD and rewrite X in Y trendiness (Score:2)
If systemd Is So Bad... (Score:2)
I intensely disliked being force to relearn the init system, DNS resolution, system and application logging, and other aspects of system management, several years ago. It really pissed me off. But, I did what I had to and it's no longer such a big deal for me. But, there is still a level of vociferous internet rage toward systemd that I am struggling to understand.
If systemd is so bad, then why are the experts(system developers, distro builders) supportive of it?
If it's just one guy at Red Hat's bad idea, a
Re: (Score:2)
If it's just one guy at Red Hat's bad idea, as is often claimed, then why does Debian and Arch rely on it?
We had discussions about this here at the time. You may feel free to locate and review them so we don't have to have them again. TL;DR: no clue about Arch, but Debian pushed the decision through with less consensus than usual to support the new GNOME, which depended on it, and which statistically no one was asking for.
Re: (Score:2)
I intensely disliked being force to relearn the init system, DNS resolution, system and application logging, and other aspects of system management, several years ago. It really pissed me off. But, I did what I had to and it's no longer such a big deal for me. But, there is still a level of vociferous internet rage toward systemd that I am struggling to understand.
If systemd is so bad, then why are the experts(system developers, distro builders) supportive of it?
If it's just one guy at Red Hat's bad idea, as is often claimed, then why does Debian and Arch rely on it?
I feel like the experts know better than me as a user. Why are the experts wrong? Why are the distros that do not use systemd such tiny niche players?
Oh - you didn't hear about how Linux was destroyed by systemd, and the only functioning distros remaining are free of the abomination?
Me either.
Re: (Score:3)
Yeah I absolutely love the fact that my init system has a say about DNS servers and how logging happens. The journalctl system is dumb. Most of what it logs is useless dbus messages. I prefer good old syslog.
Re: (Score:2)
Yeah I absolutely love the fact that my init system has a say about DNS servers and how logging happens. The journalctl system is dumb. Most of what it logs is useless dbus messages. I prefer good old syslog.
And the wonderful thing is that you have choices that don't use systemd. Or do you want everyone to use what you prefer? MacOS doesn't use it so maybe that would suit! 8^/ MacOS uses launchd. Anyhow, use the OS version that pisses you off the least.
Re: (Score:2)
Anyhow, use the OS version that pisses you off the least.
Sigh...pulls out CP/M floppies...
Re: (Score:2)
Anyhow, use the OS version that pisses you off the least.
Sigh...pulls out CP/M floppies...
I salute you sir!
Re: (Score:2)
This gives some insight to the voting by the Debian team to adopt systemd. https://lwn.net/Articles/58531... [lwn.net]
All I can say is that it's very telling that Poettering now works for Microsoft.
Re: (Score:2)
Also, it's a set of tools, that is more-or-less standardized at this point. In some circles (such as avionics) it's actually a godsend because systemd system extensions (sysext) is an implementation that replaces brittle bullshit that had to be built and maintained by each manufacturer to meet ARINC standards. Now we don't have situation with multiple implementations of the same concept, and every avionics manufacturer owning their own implementation, tooling, and proprietary transfer tools. Now, you jus
Re: (Score:2)
Systemd makes an explosion everywhere it is used. It keeps the old rust off the tires.
Re: (Score:3)
If systemd is so bad, then why are the experts(system developers, distro builders) supportive of it?
Because it is a tool aimed at distro builders. It does the things they want. That doesn't mean it's good design, and it doesn't follow the Unix way.
Lennart Poettering kissed distro builder's asses until they included his tool. Once he got it in, he did whatever he wanted.
Re: (Score:3)
I suspect the people who hate it don't have problems it solves.
Maybe a very basic home laptop is fine with SysV today and they don't want to learn anything new.
Personally I've been able to retire thousands of lines of scripts I'd written to handle complex things with many edge cases and ugly devops modules that are no longer needed with more recent releases.
There's just no userland interface to many of the events it can respond to and it's not easy to write a new C++ daemon to handle each need that comes up