# NyxOS: A self-hosting x86_64 kernel with a GUI, TCP/IP, and an in-OS C compiler

> NyxOS is a from-scratch x86_64 operating system that boots to a windowed desktop, runs a real TCP/IP stack, and compiles its own userspace inside the running system. It is a serious hobby OS with a narrow hardware target and a steep build requirement.

**kazah-png/nyx-os** — x86_64 higher-half kernel with multitasking, GUI compositor, TCP/IP networking, EXT2 filesystem, ELF userspace and full app suite

- Repository: https://github.com/kazah-png/nyx-os
- Website: https://nyxos.cc
- Stars: 36 · Forks: 7
- Language: C
- License: GPL-2.0
- Published: 2026-08-24 · Updated: 2026-08-24 · Language: en
- Canonical page: https://hysenlabs.com/projects/kazah-png-nyx-os

## What NyxOS actually is

The README claims it boots on a physical UEFI machine, an 8-inch Intel Core i5-1035G7 handheld, booted from USB and running entirely from RAM. That is a specific, narrow hardware target. The release image NyxOS-uefi.iso boots via GRUB-EFI into a GOP framebuffer, and you must turn Secure Boot off. This is not a general-purpose OS; it is a demonstration that a from-scratch kernel can reach a usable desktop on real iron, but only on very particular hardware.

## How it works: kernel, memory, and scheduler

The kernel is x86_64 long mode with GDT/IDT, 4-level paging, and a higher-half kernel mapping. Physical memory is managed by a bitmap allocator with a 16 MB kernel heap, and each process gets its own page directory. The README mentions user/kernel page-table isolation, NX, SMEP, and CR3 switching in ISR/IRQ/syscall, which is a modern security posture for a hobby OS. The scheduler is a preemptive weighted round-robin at 1000 Hz via the PIT timer. Fault isolation is a key claim: a ring-3 fault kills only that process, never the kernel. SMP is supported for multi-core, with APs running kernel threads and ring-3 processes in parallel behind spinlocks, including TLB-shootdown IPIs. This is a substantial design, and the fact that it is all in C and assembly with no external libraries means you can read the entire source in the kernel/ directory, organized into core, mm, proc, fs, drivers, net, crypto, image, and auth.

## Userspace and the self-hosting toolchain

Userspace runs in ring 3 with an ELF64 loader and initramfs, and exposes 57 syscalls via syscall/sysret. The README lists copy-on-write fork, execve, waitpid, anonymous pipe, dup2, POSIX signals, demand-paged sbrk, and mmap/munmap/mprotect. There is a shared ELF libc mapped into every process, and runtime dlopen/dlsym. The shell nyxsh supports pipelines, job control, globbing, &&/||/;, command substitution, and quoting. The standout feature is the in-OS C toolchain: a ported TinyCC compiles C to native ELF inside NyxOS via the cc builtin. It is self-hosting, meaning the in-OS compiler compiles its own source, and cc --self then builds programs with that self-built compiler. The README claims it rebuilds real coreutils and the shell byte-identically to their cross-compiled originals. That is a strong, verifiable claim, but you would need to run it to confirm. The xbm package manager compiles packages from recipes with cc and installs to /mnt/bin, with remove and search commands.

## Networking, filesystem, and desktop

The network stack includes an RTL8139 driver, ARP, IPv4, ICMP (ping), DHCP client, UDP, and a full TCP state machine with retransmission, passive open, and 8 concurrent connections. Ring-3 BSD sockets are provided, along with poll() multiplexing, nc, and an HTTP client. The filesystem is a ramdisk VFS plus persistent EXT2 read/write, auto-mounted at /mnt, supporting 1K/2K/4K blocks, indirect and double-indirect blocks, and sparse files. The desktop is a double-buffered window compositor with 32 windows, z-ordering, drag/resize, 4 workspaces, a taskbar, and a Start menu. Applications include a terminal, file manager, text editor, image viewer, paint, settings, sound test, and the Selene web browser with TLS, HTML, and image rendering. There is also DOOM. This is a full application suite, which is rare for a hobby OS, but the compositor limit of 32 windows and the 8-connection TCP limit are hard constraints you will hit quickly.

## Getting it running: build and boot

To build, you need an x86_64-elf cross-toolchain (or host GCC with -m64), nasm 2.14 or newer, GNU make, and QEMU 8.0 or newer. On Linux or WSL, run make -C kernel. On Windows, build.ps1 requires the WSL cross-compiler at cross/bin/. To run in QEMU with the GUI desktop, use qemu-system-x86_64 -kernel kernel/nyx-kernel.bin -m 512M -no-reboot. For persistent disk, networking, and sound, add -hda ext2-test.img, -nic user,model=rtl8139, and audio devices as shown in the README. On Windows, run.ps1 offers GUI, serial, net, and sound modes. For real hardware, flash the NyxOS-uefi.iso with Rufus in DD mode, turn Secure Boot off, and pick a rotation at the boot menu for portrait panels. The README points to docs/REAL_HARDWARE.md for a full checklist. There is no prebuilt binary for a generic PC; you must build the kernel yourself or use the release ISO. The build is not trivial: you need a cross-toolchain, which is a barrier for casual users.

## Limitations and failure modes

The most obvious limitation is hardware support. The network stack only has an RTL8139 driver, which is a 1990s NIC, and the real-hardware boot is confirmed only on one specific Intel handheld with a GOP framebuffer. There is no mention of USB, SATA, NVMe, or modern GPU drivers. If you have a typical laptop or desktop, NyxOS will likely not boot or will lack drivers. The TCP stack supports only 8 concurrent connections, which is fine for a demo but not for real browsing. The compositor is limited to 32 windows, and the kernel heap is only 16 MB, which constrains memory-heavy workloads. The self-hosting compiler is TinyCC, which is fast but not optimizing; the README claims byte-identical rebuilds of coreutils, but that is a specific claim that could break if you change the toolchain. There is also no mention of a network security layer beyond basic TCP; TLS is present only for the Selene browser, not for the whole stack. For anyone expecting a general-purpose OS, these are deal-breakers. For a learning project, they are acceptable trade-offs.

## Alternatives and how they differ

The closest alternative is SerenityOS, a from-scratch Unix-like OS with a GUI, but it is written in C++ and targets x86 with a different design philosophy: it has its own web browser (Ladybird) and a larger application suite, but it does not have an in-OS C compiler that rebuilds itself; it uses a cross-compiler from the host. Another alternative is ToaruOS, which is a hobby OS with a compositor and a userspace, but it is also C-based and does not have a self-hosting toolchain to the same degree. The key difference with NyxOS is the self-hosting claim: you can compile C inside the OS and rebuild the OS itself, which is a rare capability. SerenityOS has a much larger community and more drivers, but it is heavier and requires more resources. NyxOS is lighter and more focused on demonstrating a complete kernel in a small codebase. If you want a production-like hobby OS with broad hardware support, SerenityOS is the better choice; if you want to study a minimal self-hosting kernel, NyxOS is unique.

## Maintenance, license, and upgrade cost

The project is under GPL-2.0, which means any derivative work must be open-sourced under the same license. The repository is not archived, and the last push is from August 2026, with a recent v6.4.228 release. There is a build.yml and codeql.yml in GitHub Actions, indicating continuous integration and static analysis. The README mentions a wiki and a support page. Maintenance cost is high: you must build a cross-toolchain and keep it updated, and the kernel is tightly coupled to specific hardware (RTL8139, SB16, specific CPU features). Upgrading to newer releases may require rebuilding the toolchain or adjusting QEMU flags. There is no package repository beyond xbm, which compiles from recipes, so adding new software requires writing recipes. The license is permissive for learning but restrictive for commercial use. Before adopting, check the source for any non-GPL components, especially the TLS implementation in crypto/, which might use a third-party library with a different license.

## Conclusion

Adopt NyxOS if you are a hobby OS developer or a systems programmer who wants to study a complete, working kernel with a GUI, networking, and a self-hosting toolchain. Do not use it as a daily driver or for production: it targets QEMU and one specific Intel handheld, has no USB or modern hardware support beyond that, and its network stack is limited to RTL8139 and 8 TCP connections. Before adopting, verify that your hardware matches the documented boot path (UEFI with Secure Boot off, GOP framebuffer) and that you can build the cross-toolchain, since the build requires an x86_64-elf cross-compiler or WSL on Windows. The project is actively maintained with recent releases, but its GPL-2.0 license and self-hosting claim mean you should check the source for any proprietary components before redistributing.

## FAQ

### What makes nyx-os different from a Linux distribution?

It is written from scratch in C and x86_64 assembly with no external libraries. It boots via Multiboot through GRUB into long mode with 4-level paging and provides its own preemptive kernel, ring-3 userspace, TCP/IP stack, EXT2 filesystem and windowed desktop.

### Can nyx-os run on a real computer?

Yes. The NyxOS-uefi.iso release image boots via GRUB-EFI into a GOP framebuffer. Flash it with Rufus in DD mode, turn Secure Boot off in firmware, and pick a rotation at the boot menu if your panel is portrait.

### What does the cc command do in nyx-os?

It is the builtin that drives a ported TinyCC compiling C to native ELF entirely inside the running system. cc --self then builds programs with the compiler that the in-OS compiler produced when it compiled its own source.

### How do I install a program on nyx-os?

With xbm. xbm install <name> compiles a package from its recipe with cc and installs it to /mnt/bin, where it runs by bare name. xbm remove uninstalls, xbm search finds packages, and xbm list [--installed] shows the repository or the installed set.

### Which network hardware does the nyx-os kernel support?

The RTL8139 driver. Above it the stack implements ARP, IPv4, ICMP for ping, a DHCP client, UDP, and a TCP state machine with retransmission, passive open and 8 concurrent connections, exposed to ring 3 as BSD sockets with poll().

### Which languages does nyx-os have ports of?

Seventeen in total, each in its own repository under the nyxos-dev organisation, with the C implementation in this repository. The listed ports include Ada, Asm, Cpp, CSharp, COBOL, D, Go, Hare, Haskell, Lisp, Nim, OCaml, Odin, Pascal, Rust and Swift.

## Sources

- [Official documentation](https://nyxos.cc)
- [Official README](https://github.com/kazah-png/nyx-os#readme)
- [Project repository](https://github.com/kazah-png/nyx-os)
- [Release notes](https://github.com/kazah-png/nyx-os/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/kazah-png-nyx-os
