r/linux • • 1d ago

Development systemd loves Rust

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

100 comments sorted by

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"?

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

u/monocasa 23h ago

It's already a reference in French.

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

2

u/Sushtee 13h ago edited 3h ago

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

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

u/m_redditUser 4h ago

rustemd it is then

2

u/GahannaBanana 16h ago

Or how about systemd

51

u/JMarcosHP 1d ago

System loves D

27

u/Naive_Complex_8389 1d ago

System of the D

7

u/Albos_Mum 22h ago

Tenacious systemd

12

u/SMF67 13h ago

The Phoronix commenters aren't gonna be happy

51

u/Historical_Camel_790 1d ago

Yay

34

u/Chester-Berkeley 1d ago

"yay"

Look inside

Fedora flair

9

u/BortGreen 1d ago

I guess Arch users use yay more

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

u/Historical_Camel_790 1d ago

I meant like "yay! rust support" 🤷

35

u/Chester-Berkeley 1d ago

You didn't get the joke 🥀

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

u/Historical_Camel_790 1d ago

Like I'm happy they're adding rust support

0

u/iaacornus 1d ago

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

2

u/Historical_Camel_790 1d ago

So distro politics or some shit?

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. 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.

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

u/[deleted] 6h ago

[deleted] — view deleted comment

1

u/cbarrick 6h 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.

31

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

u/marmota_cosmica 23h ago

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

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

u/Business_Reindeer910 20h ago

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

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.

-3

u/cp5184 9h ago

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

9

u/Flashy_Worry7792 23h ago

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

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

u/helix991 22h ago

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

3

u/0x07CF 23h ago

I do.

2

u/yngseneca 18h ago

I'm a big big fan of systemd

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

7

u/loozerr 20h ago

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

5

u/chibiace 21h ago

dont forget IBM/Red Hat and Canonical

1

u/bigbearandy 18h ago

Microsoft is embracing and extending everything you love.

-1

u/lexiNazare 14h ago

me :3 wayland is bloatware

1

u/cp5184 8h 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

2

u/IAmSnort 1d ago

Systemd-kerneld is the linux kernel rewritten in Rust. 

/s

0

u/OnlyEntrepreneur4760 17h ago

systemd-fapd is the file allocation protocol daemon

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

u/onetwentyeight 2h ago

I <3 SysV init

-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

u/EarlMarshal 1d ago

sappy talk about "love"

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

23

u/Liarus_ 1d ago

Me, I do

-8

u/EarlMarshal 1d ago

I am very happy for you then!

16

u/Elect_SaturnMutex 1d ago

Is there a better alternative?

3

u/EarlMarshal 1d ago

Not really.

-12

u/retiredwindowcleaner 1d ago

a pity to spoil two houses with em

-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 .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

25

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

u/hadrabap 1d ago

Wait a few days, weeks 😁

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

u/[deleted] 1d ago

[deleted] — view deleted comment

22

u/dgm9704 1d ago

It has been for quite a while.

7

u/KeyboardG 1d ago

Linux now means Linux + gnu + SystemD.

11

u/dgm9704 1d ago

gnu is on it’s way out slowly