An x86 kernel written in Zig
Pluto is a kernel written almost entirely in Zig and supports x86, with aarch64 and x64 backends being planned.
All of these goals will benefit from the features of Zig.
Requires a master build of Zig at commit ad33e3483 (downloaded or built from source), xorriso and the grub tools (such as grub-mkrescue). A qemu-system binary compatible with your chosen target is required to run the kernel (e.g. qemu-system-i386).
zig build run
or if you want to wait for a gdb connection:
zig build debug-run
Launch a gdb-multiarch instance and connect to qemu.
zig build debug
Run the unit tests.
zig build test
Run the runtime tests.
zig build rt-test -Dtest-mode=
Available test modes:
None: This is the default, this will run the OS normally.
Initialisation: Run the OS's initialisation runtime tests to ensure the OS is properly set up.
Panic: Run the panic runtime test.
-D[build-mode]=: Boolean (default
-Dtarget=: String (default
i386-freestanding). The standard target options for building with zig. Currently supported targets:
-Ddisable-display: Boolean (default
We welcome all contributions, be it bug reports, feature suggestions or pull requests. We follow the style mandated by zig fmt so make sure you've run
zig fmton your code before submitting it.
We also like to order a file's members (public after non-public):
More styling information is available on the wiki