r/vibecoding • u/eggyegged • 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.
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.
edit: this is just what I saw at first pass. Still cool, but not ready for anyone to run imo.
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?
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.
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.
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.
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.
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?
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
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