NyxOS, rebuilt from scratch in Go — a freestanding 64-bit kernel that boots on bare metal
Part of the NyxOS family — the same OS, rebuilt from zero in a different language each time. This is the Go cut.
Go is garbage-collected and scheduler-driven, so the interesting part is stripping all of that away: TinyGo compiles the kernel with -gc=none -scheduler=none -panic=trap, leaving a freestanding amd64 object with a C-exported kmain and only a handful of runtime symbols (stubbed, never called). A Multiboot assembly stub enables SSE, identity-maps memory, switches the CPU to long mode, and calls kmain, which paints the banner straight into VGA text memory.
Why Go: garbage-collected, goroutines, a real runtime — which makes a no-GC, no-scheduler bare-metal cut the challenge. A full Go OS was proven feasible by gopher-os.
Needs tinygo, nasm, ld, grub-mkrescue + xorriso, and qemu.
make # -> nyxos-go.iso (64-bit ELF booted via GRUB)
make run # boot the ISO in QEMUBecause the kernel is a 64-bit ELF, it boots from a GRUB ISO (qemu -cdrom) rather than qemu -kernel.
kernel.go— the freestanding Go kernel (VGA console), built with TinyGoboot64.asm— Multiboot header + the 32-bit → long-mode trampoline that callskmainstubs.s— no-op stubs for the three runtime symbols TinyGo leaves undefinedlinker64.ld— links the 64-bit kernel at 1 MiB, Multiboot header firstgrub.cfg/Makefile— ISO packaging and boot
Early — it boots and paints the screen. Next up: a GDT/IDT, interrupts, and a VGA console.
