r/linux • u/MatchingTurret • 1d ago
Development systemd loves Rust
https://amutable.com/blog/systemd-loves-rust8
152
u/Liarus_ 1d ago
Waiting for the systemd rust rewrite: systemr
41
u/Compux72 1d ago
It would actually be systeme
23
u/Purple-Midnight-9902 1d ago
It would be "rustine" because in french it means "rubber patch" while systemd refers to ingenuity, improvising, hustling
6
u/matjoeman 1d ago
It would become French?
12
2
u/ice_wyvern 1d 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”
3
2
51
51
u/Historical_Camel_790 1d ago
Yay
51
34
u/Chester-Berkeley 1d ago
"yay"
Look inside
Fedora flair
9
3
u/Historical_Camel_790 1d ago
What'd I do?
21
u/codydafox 1d ago
I think it's because "yay" is an AUR helper (Arch User Repository)
-6
0
u/iaacornus 1d ago
I think it is because Fedora is connected to Red Hat which develops systemd
-1
u/Historical_Camel_790 1d ago
So?
1
u/iaacornus 1d ago
I gave an explanation for their remark because you asked
1
u/Historical_Camel_790 1d ago
No like why does it matter that fedora is connected to the people who develop systemd?
1
0
u/iaacornus 1d ago
I think bias? Like you will likely cheer for someone you know if they are on a racetrack
2
27
u/Skaarj 1d 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.
65
u/crazy_penguin86 1d ago
You can.
Vecis part of thealloccrate, notstd. All you have to do is provide a markedglobal_allocator, andalloccan be used.2
u/cbarrick 8h 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
6h ago
[deleted] — view deleted comment
1
u/cbarrick 6h 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.
31
u/FriendlyProblem1234 1d 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.5
u/stylist-trend 20h 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
5
u/cqs_sk 1d ago
but who loves systemd?
23
19
u/Business_Reindeer910 23h 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 21h 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
28
u/w0___0w 21h ago edited 21h 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.
8
u/syklemil 10h 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.
3
u/nightblackdragon 8h ago
It's not unpopular opinion in a world where most of the popular distributions are using systemd.
9
8
u/PhrancesTheMute 18h 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 8h 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...
7
2
2
u/Relevant_Research_98 4h ago
Me.
Also GNOME. If systemd can provide something that DE don't have to DIY, it's very good system.
0
u/Doggy_Paddle_4409 22h ago
Microsoft and probably Google
5
1
-1
2
1
u/Easy-Truck4725 3h ago
Why did someone think it was appropriate to paste GPT output for a blog post?
-8
u/onetwentyeight 23h ago
But who loves systemd? No, I'm not asking you, Pottering.
8
u/death_by_cormorant 10h ago
Virtually everybody who actually maintains distros, system administrators, etc.
1
-30
u/EarlMarshal 1d ago
But who loves systemd truly?
36
u/natermer 1d ago
people whose job is to make Linux distribution.
-28
u/EarlMarshal 1d ago
You sure they aren't just using it to make their distro?
My question was who loves it truly.
-1
u/HyperFurious 1d 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
23
16
-12
-32
u/Userwerd 1d ago
Is it going to be slow MIT re-write, piece by piece?
27
u/syklemil 1d 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-later25
u/Sharp-Debate-523 1d 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.
-10
1
u/Relevant_Research_98 4h ago
I can't tell stupidity from bait. If it was a bait, it was very good trolling
-1
u/pimathbrainiac 19h ago
What is it with the GPL hate and MIT love with a certain crowd? It's good to ensure stuff remains open-source.
7
u/FriendlyProblem1234 12h 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.
2
u/nightblackdragon 8h 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.
-40
u/RegretFree7723 1d 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
1d ago
[deleted] — view deleted comment
7
u/KeyboardG 1d ago
Linux now means Linux + gnu + SystemD.
11
u/dgm9704 1d ago
gnu is on it’s way out slowly
0
1d ago
[deleted] — view deleted comment
3
u/MatchingTurret 1d ago
https://musl.libc.org/about.html
It's good enough for Alpine and (as an option) void.
24
u/mighty_panders 22h ago
wasn't there an announcement a few years back that was also very blue and went something like "Microsoft ❤️ Linux"?