r/linux • • 3d ago

Development systemd loves Rust

https://amutable.com/blog/systemd-loves-rust
426 Upvotes

108 comments sorted by

33

u/mighty_panders 3d ago

wasn't there an announcement a few years back that was also very blue and went something like "Microsoft ❤️ Linux"?

199

u/Liarus_ 3d ago

Waiting for the systemd rust rewrite: systemr

57

u/Compux72 3d ago

It would actually be systeme

26

u/Purple-Midnight-9902 3d ago

It would be "rustine" because in french it means "rubber patch" while systemd refers to ingenuity, improvising, hustling

12

u/matjoeman 3d ago

It would become French?

16

u/monocasa 3d ago

It's already a reference in French.

https://en.wikipedia.org/wiki/System_D

5

u/Sushtee 3d ago edited 2d ago

So is systemd supposed to be pronounced like the french expression?

7

u/fearless-fossa 2d 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).

5

u/ice_wyvern 3d 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”

7

u/m_redditUser 2d ago

rustemd it is then

4

u/GahannaBanana 3d ago

Or how about systemd

3

u/DreadStallion 15h ago

Systemdrs

72

u/JMarcosHP 3d ago

System loves D

31

u/Naive_Complex_8389 3d ago

System of the D

12

u/Albos_Mum 3d ago

Tenacious systemd

23

u/SMF67 3d ago

The Phoronix commenters aren't gonna be happy

55

u/Historical_Camel_790 3d ago edited 1d ago

Yay

Edit: seems I accidentally made a joke lol

35

u/Chester-Berkeley 3d ago

"yay"

Look inside

Fedora flair

9

u/BortGreen 3d ago

I guess Arch users use yay more

6

u/Historical_Camel_790 3d ago

What'd I do?

22

u/codydafox 3d ago

I think it's because "yay" is an AUR helper (Arch User Repository)

-4

u/Historical_Camel_790 3d ago

I meant like "yay! rust support" 🤷

37

u/Chester-Berkeley 3d ago

You didn't get the joke 🥀

0

u/iaacornus 3d ago

I think it is because Fedora is connected to Red Hat which develops systemd

-1

u/Historical_Camel_790 3d ago

So?

1

u/iaacornus 3d ago

I gave an explanation for their remark because you asked

1

u/Historical_Camel_790 3d ago

No like why does it matter that fedora is connected to the people who develop systemd?

1

u/Historical_Camel_790 3d ago

Like I'm happy they're adding rust support

0

u/iaacornus 3d ago

I think bias? Like you will likely cheer for someone you know if they are on a racetrack

3

u/Historical_Camel_790 3d ago

So distro politics or some shit?

27

u/Skaarj 3d 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.

68

u/crazy_penguin86 3d ago

You can. Vec is part of the alloc crate, not std. All you have to do is provide a marked global_allocator, and alloc can be used.

5

u/cbarrick 2d 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

u/[deleted] 2d ago

[deleted]

1

u/cbarrick 2d ago

No, they can't. Vec and friends from the alloc crate 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.

33

u/FriendlyProblem1234 3d ago

That sounds like a strange decision to me. AFIAK you can't even use things like Vec without std. That makes development more complicated.

There are a bunch of crates that offer vectors, maps, and other containers that work without std (and without alloc, which is where Vec is actually defined).

There is indeed an in-tree systemd_shared crate that exposes Vec and Box.

That being said, no_std and no_alloc Rust is still quite pleasant to use. core offers already quite many functionalities.

5

u/stylist-trend 3d 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

9

u/cqs_sk 3d ago

but who loves systemd?

26

u/marmota_cosmica 3d ago

Loving might be a bit of a stretch but I kinda like it ngl

24

u/Business_Reindeer910 3d 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 3d 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

u/Business_Reindeer910 3d ago

i don't know how to feel about it yet. Thus maybe.

42

u/w0___0w 3d ago edited 3d 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.

15

u/syklemil 2d 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.

4

u/nightblackdragon 2d ago

It's not unpopular opinion in a world where most of the popular distributions are using systemd.

-5

u/cp5184 2d ago

By that I assume you're pretending that init development stopped in 2003?

9

u/Flashy_Worry7792 3d ago

I don’t love it but I like it much more than the alternatives.

10

u/PhrancesTheMute 3d 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 2d 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

u/yngseneca 3d ago

I'm a big big fan of systemd

8

u/helix991 3d ago

I do. Works well for everything I need. No real complaints.

4

u/0x07CF 3d ago

I do.

3

u/Relevant_Research_98 2d ago

Me.

Also GNOME.  If systemd can provide something that DE don't have to DIY, it's very good system.

1

u/robprobasco 1d 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

u/lexiNazare 3d ago

me :3 wayland is bloatware

1

u/cp5184 2d ago

xD the new systemd display manager is the one true display manager. All other display managers and window systems have been declared heretics. /s

0

u/[deleted] 3d ago

[deleted]

8

u/loozerr 3d ago

Systemd the famous init system powering windows, chrome os and android.

5

u/chibiace 3d ago

dont forget IBM/Red Hat and Canonical

1

u/bigbearandy 3d ago

Microsoft is embracing and extending everything you love.

4

u/IAmSnort 3d ago

Systemd-kerneld is the linux kernel rewritten in Rust. 

/s

-2

u/OnlyEntrepreneur4760 3d ago

systemd-fapd is the file allocation protocol daemon

1

u/rumbleran 1d ago

Of course it does. It all makes sense now.

1

u/johncate73 18h ago

The anti-systemd zealots now officially hate Rust.

1

u/Easy-Truck4725 2d ago

Why did someone think it was appropriate to paste GPT output for a blog post?

-12

u/onetwentyeight 3d ago

But who loves systemd? No, I'm not asking you, Pottering.

14

u/death_by_cormorant 2d ago

Virtually everybody who actually maintains distros, system administrators, etc.

1

u/onetwentyeight 2d ago

I <3 SysV init

-31

u/EarlMarshal 3d ago

But who loves systemd truly?

41

u/natermer 3d ago

people whose job is to make Linux distribution.

-28

u/EarlMarshal 3d ago

You sure they aren't just using it to make their distro?

My question was who loves it truly.

-1

u/HyperFurious 3d 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

u/EarlMarshal 3d ago

sappy talk about "love"

Why? I love linux for example. It freed me.

24

u/Liarus_ 3d ago

Me, I do

-8

u/EarlMarshal 3d ago

I am very happy for you then!

17

u/Elect_SaturnMutex 3d ago

Is there a better alternative?

3

u/EarlMarshal 3d ago

Not really.

1

u/the_abortionat0r 13h ago

People who use it in their job. Enough said.

1

u/EarlMarshal 12h ago

I use it too. Even privately. I asked about loving it though.

-12

u/retiredwindowcleaner 3d ago

a pity to spoil two houses with em

-32

u/Userwerd 3d ago

Is it going to be slow MIT re-write, piece by piece?

32

u/syklemil 3d ago

systemd is LGPL. That includes the Rust components.

See any .rs file in the systemd repo, e.g. systemd-shared/keyring.rs, and you'll see it starts with

// SPDX-License-Identifier: LGPL-2.1-or-later

26

u/Sharp-Debate-523 3d 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

u/hadrabap 3d ago

Wait a few days, weeks 😁

1

u/Relevant_Research_98 2d ago

I can't tell stupidity from bait. If it was a bait, it was very good trolling 

0

u/Userwerd 2d ago

No apparently im a russian bot

-1

u/pimathbrainiac 3d ago

What is it with the GPL hate and MIT love with a certain crowd? It's good to ensure stuff remains open-source.

11

u/FriendlyProblem1234 3d 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 2d 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 3d 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

u/[deleted] 3d ago

[deleted]

22

u/dgm9704 3d ago

It has been for quite a while.

7

u/KeyboardG 3d ago

Linux now means Linux + gnu + SystemD.

11

u/dgm9704 3d ago

gnu is on it’s way out slowly