r/Zig • • 2d ago

Unkernel is partly implemented in Zig

The very impressive Unkernel is partly implemented in Zig.

Repo: https://github.com/pithings/unkernel

The Register thinks, we are already in 2035 ... a quote:

Unkernel boots a real Linux kernel inside a Arm64 runtime, written in Zig and compiled to Wasm.
When you visit the Unkernel.dev page, it boots Debian 13, on a real Linux kernel, running inside your browser tab. It has 2 GB of RAM and two virtual CPU cores. It has a very simple GUI, using Wayland; press Super+K for the app launcher. Which means that, yes, you can run Doom on it.

Source: https://www.theregister.com/software/2026/11/28/unkernel-and-trynix-just-transported-computing-to-2035/5313200

64 Upvotes

14 comments sorted by

8

u/jedisct1 2d ago

Unsurprising. Zig generates very efficient WebAssembly code.

14

u/pauliesnug 2d ago

interesting, but sadly very LLM generated

1

u/HisDarkerSide 2d ago edited 2d ago

I am not playing devils advocate when I ask why "sadly"? Is this a general anti LLM stance, do you believe os kernels shouldn't be generated by LLMs? Something else I might not have mentioned?

From my standpoint I don't care if the project used an LLM so long as it was well specified by a human who understood the subject matter, it was tested adequately, and that the code eventually gets audited by many eyes.

We don't have great data on professional LLM usage yet, but an average of something between 51-70% seems pretty likely. This doesn't make it automatically preferable, but it says that usage is common. So a general anti LLM stance (if that is your stance) doesn't represent the majority.

8

u/Bergasms 2d ago

You might be surprised to learn a lot of workplaces mandate LLM usage.

I use it at work because it's now part of the flow. I don't use it at home because that means I can use it more effectively at work (skill atrophy is a real thing). Do I like using it, no, not really, it's starting to get more expensive and for every hour I gain using it I lose another dealing with "but claude says" suggestions from people who don't understand the problem domain.

All this is ignoring the environmental and social impacts of LLM's, which are many and varied. Being anti LLM is probably the more moral stance.

2

u/HisDarkerSide 2d ago

I am not sure why you addressed that to me asking someone else to clarify what they said, it seems to imply facts not in evidence

1

u/Bergasms 2d ago

You claimed on the basis of your own imagined data that an anti LLM stance doesn't represent the majority, on a public forum.

You should expect responses from other people.

If this is shocking to you, i suggest using reddit's DM feature to talk directly to someone, that way they're the only one who will see your comment.

-1

u/HisDarkerSide 2d ago

I said its use was common and I wanted clarification on a statement. I didn’t say anything about my stance other than not caring if a project was made with one or not… because it is the reality we live in now. You assumed a lot based on that.

1

u/Bergasms 2d ago

You're a bit of a pelican mate.

-1

u/alext_777 2d ago

mate, nobody's gonna manually right a whole kernel in zig even if it just loads a linux kernel

4

u/SweetBabyAlaska 2d ago

Plenty of people did before AI. I did as well. It's not that hard.

2

u/SenritsuJumpsuit 1d ago

Then why are there not 958 alternatives kernels instead of just Linux with distributions?

1

u/SweetBabyAlaska 1d ago edited 1d ago

because a serious kernel project is a monumental undertaking that requires constant work due to the level of hardware it runs at.

even then, there are plenty. there is the BSD family (used in Mac, OpenBSD, FreeBSD, PlayStation, Netflix servers, and custom high throughput servers), the Unix likes, NT based kernels (not just windows but reactos) theres Redox in Rust, etc... the embedded kernels that are designed for hyper-specific use cases, real time os kernels, etc...

there are quite a lot. But there is no real reason to try to out do Linux (even though Redox is basically a Rust Linux Kernel lol) because it has more users, devs, money, time and security scrutiny thrown at it than any in history, and Linux is free so you can fork it compile it and build anything on top of it (like Android)

but if you want a fun challenge, go to OSdev Wiki and get started with an x86 kernel. They have a Zig starter that you can use, and you can build every system. Its a great way to understand threading, IO, drivers, memory management, legacy boot systems, file systems, etc... its genuinely a rabbit hole.

2

u/SenritsuJumpsuit 1d ago edited 1d ago

Temple OS has been the only proper full I indie system all this time pretty much an all the other alternatives are limited Plan9 is awesome but capped so is Haiku and both those projects were by universities not 4 tweens on a thinkpads.

So the term easy in this case would mean 18 years of Rust OS development is easy also embedded systems rule for sure so do Exokernals an Unikernels.

1

u/red38dit 2d ago

Cool!