r/vibecoding • u/eggyegged • 5d 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.
32
u/666AB 5d 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.
49
u/Asalakabim 5d 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?
9
u/PerfectReflection155 5d 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 5d ago
Going to check it out choom, got my agent installing it to my disposable bench VM to give it a spin.
20
u/jyrox 5d 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.
76
u/GourryHacks 5d 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.
11
u/Mandelvolt 5d ago
So, does this make systemd more bloated or less bloated?
5
u/ThePapanoob 4d 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.
4
u/TrashConvo 5d ago edited 4d ago
Cool. Now migrate, use, and support it
4
u/TheFuzzball 5d 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.
1
u/OrganizationAgile361 5d ago
Can you port it to Artix linux?
3
u/theonetruelippy 5d 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/Single_Ring4886 3d ago
Do not let people discourage you!
THE IMPORTANT PART IS that you keep working on this not forget it in few days or even weeks. If you focus on this with help of multiple ai systems and make it opensource and focus for few months it can be real production stuff.
2
u/clockwork2011 5d 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 5d ago
3 commits and you're rifling it out on here? very bold.
1
u/Unusual-Pea7202 4d 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 4d ago
Now you just need to implement all the 1000 systemd edge cases they implemented over the years.
1
u/Total-Reasonable 4d 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 4d ago
That edit is doing a lot of work. Void-only means this isn't a systemd replacement for anyone else yet.
1
u/AcoustixAudio 3d ago
Why not just contribute the changes to systemd? Without some sort of benchmark 60x means nothing. Since this is the vibe coding sub I believe you, because the first thing people vibe code is a systemd replacement, but a benchmark is sure in order
1
u/FlamboyantKoala 3d ago
Love to see it. I'm not currently hacking around on a linux computer so I can't make use of it but things like this are the initial seed to faster and better systems.
1
u/SylviaJarvis 3d ago
Embedded systems have had monolithic C programs for init since before Linux.
If the hardware and applications on the system never change, then you don't need or want an extensible framework like systemd or sysvinit. Frameworks burn time and memory, and getting rid of any part of the framework makes system startup faster.
Instead, you write out the raw system calls in a single program, compile that program, and run the compiled binary init at boot. If you install some new service, you edit and recompile init. Common services like networking are supported by libraries instead of shelling out to helper utilities. If you have a massively complicated setup, you have a compile-time dependency solver that generates the code. Nothing in boot order is determined at run time.
The real innovation here was using Rust.
1
u/fhcoso 3d ago
If you want a real init alternative, you need to take a look at SMF. It's used by Solaris/OpenSolaris and Illumos distributions, and I miss it on FreeBSD and Linux.
1
u/eightrx 1d ago
How well does it work compared to runit? Are there any benefits from your initial system besides speed?
1
u/still_Horiz3n 1d ago
I built from 405bytes of hex0 to a self hosting c compiler that compiles to stage 3 fixed point for windows mac and linux
1
u/nhermosilla14 14h ago
Nice demo, although I wouldn't call this really valuable in and of itself. There are some things were a more strict reviewing process is required IMHO, and both the kernel and init are part of those.
1
u/-useEffect- 7h ago
what a joke
1
u/Tizen20 4h ago
Seems interesting. I hope this project gets maintained and stays supported in the future.
1
u/mccydoutxl 5d ago
This is lowk insane (flipping amazing) i’ve tested it and its outcome was phenomenal🎉🎉🎉🥜
1
u/Serasul 5d ago
i dont believe you, that is physical not possible