r/vibecoding • • 1d ago

Showcase/Project Gemini 4 Neon created a pure Rust, Linux init system that is 99% faster than systemd

Gemini 4 Neon built a Linux PID 1 init system in pure Rust with no dependencies, compiled into a single 209 KiB static binary. It boots 50 services in ~3 milliseconds (~60x faster than systemd) using ~420 KiB of PID 1 RAM and I'm using it as my default init system on my Void Linux desktop. (getty at 31 milliseconds and lightdm at 60 milliseconds after PID 1 starts).

How it works: One binary with no libc handles PID 1, graninitctl, and poweroff/reboot using raw Linux syscalls and a single epoll loop. Early boot tasks like fstab, sysctl, hostname, and loopback run directly inside PID 1 with zero shell forks, and desktop services aren't stuck waiting on udevadm settle to finish. To start services fast without fork() copy-on-write overhead or vfork() serialization, it launches up to 32 processes concurrently across CPU cores using clone(CLONE_VM | CLONE_CHILD_CLEARTID | SIGCHLD) plus futex on a temporary mmap stack pool that gets unmapped right after boot. From there it seals its heap (zero runtime allocations) and handles supervision, crash-loop backoff, and timestamped log rotation out of fixed buffers.

Built in Antigravity and verified with 215 C-header ABI checks, unit/kernel selftests, and 13 namespace PID 1 integration tests before switching my GRUB default: get it here!

EDIT: it currently doesn’t work well with other distros besides Void, I will be trying to get it working on other distros in due time.

EDIT 2: It should be working with other Distros besides Void and now I'm going to try to work on getting it to be an actual viable replacement for other init systems.

126 Upvotes

41 comments sorted by

18

u/666AB 1d ago

I checked this out and found a couple bugs already. I wouldn’t run this on any machine. Maybe I’ll make a PR bc I think it’s cool but idk.

This should say ‘void Linux specific’. Because it is void Linux specific for various reasons I saw on first scan.

  1. No services it starts can trigger an OOM (which is a valid thing to do sometimes ya know)
  2. kexec - so first it doesn't check that a kexec kernel is loaded. If the reboot call fails, PID 1 exits. (Panic) … also, “install.sh --replace-init” points /sbin/kexec at graninit. That overwrites the real kexec tool, which is what loads the kernel in the first place.

edit: this is just what I saw at first pass. Still cool, but not ready for anyone to run imo.

4

u/Living_Mode_6623 1d ago

I already have my robochooms porting to fedora ...

-4

u/eggyegged 1d ago

Thanks for the feedback, I have edited the post and I will be trying to get it working for other distros sometime soon.

38

u/Asalakabim 1d ago

Are you going to tell what 60x faster actually means here or do i need fable to point out how bullshit this comparison is?

14

u/eggyegged 1d ago

60x is specifically PID 1 overhead + service spawning, not total power-button-to-desktop time.

2

u/OrganizationAgile361 15h ago

is it systemd or dinit compatible? how are defined the services?

5

u/AoE3_Nightcell 1d ago

It probably means that it makes your machine boot a couple seconds faster

5

u/A_modicum_of_cheese 23h ago

1/60th of the features

-2

u/[deleted] 1d ago edited 1d ago

[removed] — view removed comment

0

u/woswoissdenniii 1d ago

As a rude person myself. Apologize for this. Bit unnecessary.

0

u/vibecoding-ModTeam 1d ago

There’s not enough time in life to deal with assholes. Try your best not to be one.

7

u/PerfectReflection155 1d ago

What benifits besides speed.

Like can I replace my current systemd or whatever on my production docker servers. Each running approx 60 containers. 1 of them also running persistent agents regulsrly and cronjobs.

1

u/eggyegged 1d ago

Besides speed, the main benefits are simplicity and fixed footprint: a single 238 KiB static binary with no libc or dependencies (~330–464 KiB PID 1 RAM, zero heap allocations after boot, 0.000 ms/s idle CPU), built-in crash-loop backoff, strict typo-checked configs, NOTIFY_SOCKET readiness, live daemon-reload, and per-service rotating timestamped logs without separate supervisor trees like s6/runit. But it is v0.1.0 and doesn't do systemd LISTEN_FDS socket activation (so dockerd uses unix:///var/run/docker.sock instead of fd://) or journald structured logs. It's solid if you want a super-lean supervisor on a Void/Alpine Docker host or test server, though on mission-critical Debian/RHEL prod boxes systemd's distro integration is still hard to beat for the risk.

2

u/Living_Mode_6623 1d ago

Going to check it out choom, got my agent installing it to my disposable bench VM to give it a spin.

2

u/eggyegged 1d ago

Thanks! I would love to hear your feedback

1

u/Living_Mode_6623 1d ago

I'll make sure to post up full details.. but I let my robochooms setup and profile it on void and they are now working on a fedora port (as that's what I use mostly.)

17

u/jyrox 1d ago

Isn’t systemd much more than just a simple init system? I thought it was responsible for a ton of other stuff while the system is running.

12

u/clockwork2011 1d ago

Some people should ask their AI about init scripts and how there's a whole "cult" around them. Non-systemd purists have been a thing for as long as systemd has been a thing for.

6

u/ThadCastleGOAT 1d ago

Take me back to the mid 2010s when the simplicity purists had their entire init in 100 lines of shell scripts, we had no window manager, relied on rawdogging X with wmutils and our status bars were fifo pipes with some color. 

2

u/clockwork2011 18h ago

How fast your computer boots was a badge of honor back then. It’s really funny to me that the normie vibers are reliving the same patterns now.

47

u/GourryHacks 1d ago

This is the beginning guys.

I rewrote kvm as a type-1 hypervisor on a single architecture in 10kb.

Everyone here saying "ok now maintain it" isn't asking themselves what "maintain" means when you can vibe a new driver in an afternoon.

18

u/DangKilla 1d ago

It’s not enterprise solution; a hobby project, sure

6

u/Zelderian 19h ago

I hate the “who’s gonna maintain it” argument for small projects. Like, I made this in an hour from scratch. Absolute worst case scenario, I’ll sacrifice another hour and remake it. Maintenance on small, curated tools is effectively nothing when you can change anything you want with a couple sentences.

9

u/Mandelvolt 1d ago

So, does this make systemd more bloated or less bloated?

4

u/ThePapanoob 21h ago

99% faster since you have no idea what a fully featured initsystem is doing and youre comparing it to one wich just doesnt do that.

1

u/OrganizationAgile361 1d ago

Can you port it to Artix linux? 

1

u/eggyegged 21h ago

Yes, I will be doing that soon

3

u/theonetruelippy 1d ago

the majority of the boot time on my kernels is stuff like initialising the wifi adapter (fw load), I don't think the actual OS is necessarily the bottleneck - but I will instrument it for enquiring minds.

3

u/TheFuzzball 1d ago

We used to initialise systems with sprawling shell scripts written by hand with no error handling. I'm sure an LLM can reproduce that in C and get fast boot times. 

That's not a replacement for systemd, though. 

3

u/TrashConvo 1d ago edited 18h ago

Cool. Now migrate, use, and support it

4

u/Useful_Judgment320 1d ago

My guy it's deployed to localhost:8484

2

u/clockwork2011 1d ago

init scripts have been a thing for a long time. Even ones written in rust. Not to take away from what your AI did here, but none of this is a new concept or idea.

2

u/xeroxedforsomereason 1d ago

3 commits and you're rifling it out on here? very bold.

1

u/Unusual-Pea7202 18h ago

the 209kb binary is impressive, but I'm more curious about how it handles service dependencies without a full init system, did it just use a flat exec order?

1

u/Zellione 18h ago

Now you just need to implement all the 1000 systemd edge cases they implemented over the years.

1

u/Total-Reasonable 17h ago

How does it handle service dependencies and readiness when launching 32 processes at once, e.g. something needing the network or dbus up first?

1

u/Professional-Bid6658 17h ago

That edit is doing a lot of work. Void-only means this isn't a systemd replacement for anyone else yet.

1

u/mccydoutxl 1d ago

This is lowk insane (flipping amazing) i’ve tested it and its outcome was phenomenal🎉🎉🎉🥜

1

u/Serasul 1d ago

i dont believe you, that is physical not possible