r/linux • u/MatchingTurret • 22d ago
Development systemd loves Rust
https://amutable.com/blog/systemd-loves-rust8
u/somnamboola 17d ago
I honestly don't get the hate towards systemd. it works
9
2
u/SuddenPromotion7736 15d ago
i dont hate systemd, theres plenty of reasons why someone would use it. I personally do not but wont talk down upon anyone for using it.
My primary issues with systemd is its monolithic nature. its a massive codebase for something that doesnt need to be that huge. An init system at its core is supposed to manage services and systemd has morphed into something that does a lot more than just that which does not align with a BSD or oldschool unix type philosohy.
my second issue with systemd is the log system. journald is difficult to read and too much to process in a reasonable time frame whereas on my openrc systems its simple human readable text whenever something crashes and throws error messages.
my 3rd and final issue with systemd is a bit of a niche perspective.. i use gentoo and actively compile software on my computer from source, stripping away dependency trees that i dont want or need that come prepackaged in upstream repositories by default. most software builds contain flags for both x11 and wayland, both pipewire, alsa and pulse audio, both systemd and openrc.. they do this to make sure things work properly on a wide array of setups.. but the trade off is you wind up with unnessecary dependencies on your system as a result which can even cause conflicts later down the road..
so how does this tie into systemd? well.. because systemd has become so popular.. most packages are built with systemd support in mind by default. its become so big in fact that some software straight up refuses to work without installing certain systemd related packages.. as someone who refuses to use systemd, i have to jump through hoops to make certain software work on my system at all or switch to alternative software with its own issues just to avoid using something im not the biggest fan of. i use linux for control and freedom of choice.. systemd over the years has made it extremely difficult for me to have said freedom over what goes on my system when even a program like networkmanager refuses to work without elogind.
that being said.. the problem isnt systemd, it never has been.. i personally blame the developers behind all of this software for years of technical debt influencing the entire ecosystem in such a way. I dont hate systemd because at the end of the day it functions.. but 9/10 when im stuck in dependency hell it is regulary linked to me refusing to compile a certain systemd dependency required by another piece of software.
8
226
u/Liarus_ 22d ago
Waiting for the systemd rust rewrite: systemr
67
u/Compux72 22d ago
It would actually be systeme
30
u/Purple-Midnight-9902 22d ago
It would be "rustine" because in french it means "rubber patch" while systemd refers to ingenuity, improvising, hustling
13
u/matjoeman 22d ago
It would become French?
17
u/monocasa 22d ago
It's already a reference in French.
5
u/Sushtee 22d ago edited 21d ago
So is systemd supposed to be pronounced like the french expression?
7
u/fearless-fossa 21d ago
No, because it isn't a reference to System D:
Spelling
Yes, it is written systemd, not system D or System D, or even SystemD. And it isn't system d either. Why? Because it's a system daemon, and under Unix/Linux those are in lower case, and get suffixed with a lower case d. And since systemd manages the system, it's called systemd. It's that simple. But then again, if all that appears too simple to you, call it (but never spell it!) System Five Hundred since D is the roman numeral for 500 (this also clarifies the relation to System V, right?). The only situation where we find it OK to use an uppercase letter in the name (but don't like it either) is if you start a sentence with systemd. On high holidays you may also spell it sÿstëmd. But then again, Système D is not an acceptable spelling and something completely different (though kinda fitting).8
u/ice_wyvern 22d ago
The convention for rust rewrites I’ve seen is to add “rs” as a prefix/suffix, or to use a rust/oxide theme for the name
So “systemd-rs”, or “rs-systemd”. If there’s already an s, you’d sometimes see something like “rsystemd”
8
5
3
81
58
u/Historical_Camel_790 22d ago edited 21d ago
Yay
Edit: seems I accidentally made a joke lol
56
39
u/Chester-Berkeley 22d ago
"yay"
Look inside
Fedora flair
9
6
u/Historical_Camel_790 22d ago
What'd I do?
23
u/codydafox 22d ago
I think it's because "yay" is an AUR helper (Arch User Repository)
-4
0
u/iaacornus 22d ago
I think it is because Fedora is connected to Red Hat which develops systemd
-1
u/Historical_Camel_790 22d ago
So?
1
u/iaacornus 22d ago
I gave an explanation for their remark because you asked
1
u/Historical_Camel_790 22d ago
No like why does it matter that fedora is connected to the people who develop systemd?
1
0
u/iaacornus 22d ago
I think bias? Like you will likely cheer for someone you know if they are on a racetrack
3
29
u/Skaarj 22d ago
No-std Rust. systemd also doesn't use the Rust standard library. We currently don't need to consume anything that the standard library provides.
That sounds like a strange decision to me. AFIAK you can't even use things like Vec without std. That makes development more complicated.
69
u/crazy_penguin86 22d ago
You can.
Vecis part of thealloccrate, notstd. All you have to do is provide a markedglobal_allocator, andalloccan be used.5
u/cbarrick 22d ago
But later on in the article they explain that they have a custom allocation crate and only ever work with fallible allocation.
Thus all of the collections in alloc don't apply to them.
0
21d ago
[deleted]
2
u/cbarrick 21d ago
No, they can't. Vec and friends from the
alloccrate panic on allocation failure.The allocator API itself supports allocation failure just fine. The issue is the implementation of the collections. That's where the panics happen.
This is what the kernel does and for the same reason, which is why they reference the kernel in that sentence.
35
u/FriendlyProblem1234 22d ago
That sounds like a strange decision to me. AFIAK you can't even use things like
Vecwithout std. That makes development more complicated.There are a bunch of crates that offer vectors, maps, and other containers that work without
std(and withoutalloc, which is whereVecis actually defined).There is indeed an in-tree
systemd_sharedcrate that exposesVecandBox.That being said,
no_stdandno_allocRust is still quite pleasant to use.coreoffers already quite many functionalities.6
u/stylist-trend 22d ago
Yep exactly, and then there's third party crates like heapless, which give you vec-like structures when you're in an environment that doesn't have core or alloc
2
10
u/cqs_sk 22d ago
but who loves systemd?
30
27
u/Business_Reindeer910 22d ago
love is a strong word, since i have minor criticisms like usage of ini files and maybe varlink, but i definitely like a lot.
1
u/stylist-trend 22d ago
Oh interesting - I've been meaning to check out varlink but I've been procrastinating on it. Out of curiosity, what are its issues?
1
48
u/w0___0w 22d ago edited 22d ago
unpopular opinion, i happy with the init/service/mount/unit, journald, networkd, resolved, timer, timesyncd, creds and mkosi part. I remember how things were before, and I don’t miss it.
18
u/syklemil 22d ago
It's barely an unpopular opinion when the most common distros and DEs and so on all voluntarily pick up more systemd tooling as time goes on.
It's the anti-systemd stuff that's voiced by a loud minority.
6
u/nightblackdragon 22d ago
It's not unpopular opinion in a world where most of the popular distributions are using systemd.
10
12
u/PhrancesTheMute 22d ago
As a former systemd hater for no reason other than being in a echo chamber of systemd haters, I have come to love it.
-2
u/cp5184 22d ago
As a former systemd lover who only loved it for being in the echo chamber of systemd lovers I have come to hate it and much prefer openrc, finit, epoch, runit, s6, 66, dinit, and, if only because it means I have to update patched inits for critical security vulnerabilities less frequently, sysv init...
5
9
4
u/Relevant_Research_98 21d ago
Me.
Also GNOME. If systemd can provide something that DE don't have to DIY, it's very good system.
2
u/robprobasco 21d ago
I love it compared to the before times. Disparate settings based on arcane knowledge of version specific file locations? It was a nightmare. This was on like Slack or Manjaro. It’s way better than that.
-3
0
22d ago
[deleted]
4
1
5
1
1
u/Easy-Truck4725 21d ago
Why did someone think it was appropriate to paste GPT output for a blog post?
-12
u/onetwentyeight 22d ago
But who loves systemd? No, I'm not asking you, Pottering.
16
u/death_by_cormorant 22d ago
Virtually everybody who actually maintains distros, system administrators, etc.
1
-31
u/EarlMarshal 22d ago
But who loves systemd truly?
42
u/natermer 22d ago
people whose job is to make Linux distribution.
-28
u/EarlMarshal 22d ago
You sure they aren't just using it to make their distro?
My question was who loves it truly.
-1
u/HyperFurious 22d ago
I like systemd. What I don’t like as much is when a program (one for which the vast majority of people will only ever use two or three commands), gets loaded up with a bunch of crap that no one will ever use. I feel the same way about Git; it’s another program that adds a ton of new features with every version (features that no one will ever use), while the package itself just keeps getting bigger and bigger.
Also, they can use Rust (or any other language they choose) with systemd. But please, spare us the sappy talk about "love".
0
25
18
1
-12
-33
u/Userwerd 22d ago
Is it going to be slow MIT re-write, piece by piece?
32
u/syklemil 22d ago
systemd is LGPL. That includes the Rust components.
See any
.rsfile in the systemd repo, e.g. systemd-shared/keyring.rs, and you'll see it starts with// SPDX-License-Identifier: LGPL-2.1-or-later26
u/Sharp-Debate-523 22d ago
The page says: No Gratuitous Rewrites. Long-established and reliable parts of the codebase written in C will not be converted without good reason.
-11
2
u/Relevant_Research_98 21d ago
I can't tell stupidity from bait. If it was a bait, it was very good trolling
0
-1
u/pimathbrainiac 22d ago
What is it with the GPL hate and MIT love with a certain crowd? It's good to ensure stuff remains open-source.
12
u/FriendlyProblem1234 22d ago
What is it with the GPL hate and MIT love with a certain crowd? It's good to ensure stuff remains open-source.
MIT is unequivocally a free and open-source license (FOSS). And, unlike the "GPL", it is compatible with most other FOSS licenses. Including the "GPL", which ironically is not compatible with the "GPL" (because it actually does not exist, and refers to a group of partially or completely incompatible licenses: GPL-2-only, GPL-2-or-later, GPL-3-only, GPL-3-or-later).
Many core components of Linux distributions have been under permissive licenses for ages: XFree86/Xorg, MESA, Python, OpenSSL, OpenSSH, Latex, Go... Permissive licenses are first-class citizens in the FOSS world, nobody needs a justification to use them.
Looks like there is a MIT hatred, instead.
4
u/nightblackdragon 22d ago
What is it with the GPL hate and MIT love with a certain crowd? It's good to ensure stuff remains open-source.
It's actually the other way around: people create software under the MIT license not because they dislike the GPL, while some people hate anything that isn't GPL, sometimes suggesting that permissive licenses are a conspiracy to allow corporations to “steal” the code and turn it into proprietary software, thereby gaining control or something like that ignoring the fact that a lot of projects commonly used on Linux are permissively licensed. Or rather, without realizing it, given that some people criticize the sudo-rs license without knowing that the original sudo is also licensed under a permissive license.
-42
u/RegretFree7723 22d ago
Non capisco seriamente la gente che promuove rust che é letterale tone ruggine ma perché la gente che lo paragona al c perché so é di basso livello ma il c (è non sbagliate i con il c++) ha il suo senzo cioè é piccolo quindi un nuovo programmatore lo può impagare in meno di 200 pagine di spiegazione Poi é di basso livello e un programmatore del c non ha bisogno di un estezione (ma é molto più comoda) per cose piccole perché un programmatore c imparerà a riflettere con cose più piccole per problemi per poi risolvere problemi più grandi e per i problemi di memoria deve essere un programmatore poco esperto che pure con il rust farebbe problemi di memoria (pure se non ho capito come potrebbe il rust risolverli) Per un principiante e per qualcuno che deve avere una vita facile il c dove gli serve , Td:lr: ma odio cargo per essere onesto
0
22d ago
[deleted]
7
u/KeyboardG 22d ago
Linux now means Linux + gnu + SystemD.
11
u/dgm9704 22d ago
gnu is on it’s way out slowly
0
22d ago
[deleted]
3
u/MatchingTurret 22d ago
https://musl.libc.org/about.html
It's good enough for Alpine and (as an option) void.
38
u/mighty_panders 22d ago
wasn't there an announcement a few years back that was also very blue and went something like "Microsoft ❤️ Linux"?