Why to spread confusion and call it bare metal when it's run under QEMU? Then it's not bare metal at all.
In order to be run on bare metal it's needing another bootloader which the documentation only barely mentions.
More on the naming: why to call it kernel?
I'm very surprised it's *that* short - handling one in rust i'm surprised by the very low amount of code to get that up. Thanks or sharing that was a first time reading some Zig for me !
Very neat. To clarify, Qemu can boot it, but I'm pretty sure you need some bootloader (e.g. Grub) to boot it on a physical system.
I wrote something similar a while ago: https://github.com/boricj/hang-os
It handles interrupts/traps and targets the aarch64 QEMU virt platform. It also features a HAL.
What's the point of doing this in "Zig" instead of C, the traditional choice for this kind of thing?
wtf? 10 lines of hello world code is not a kernel.
Minimal slop.
Why choose intel? Let's build bootable software in 2026
Here's one for Risc-V that's a little more fleshed out, also in Zig: https://github.com/Fingel/aeros-v/blob/main/src/kernel.zig