u/ObjectNo809

▲ 75 r/osdev

I made a 64-bit hobby OS with a JavaScript userland. Here's Snake running on it.

NephilimOS is a MINIX-inspired bare-metal x86_64 kernel I wrote from scratch — boots via GRUB Multiboot 1, runs a cooperative scheduler, mounts ext2 from a RAM disk, and executes userland apps written in JavaScript via an embedded MuJS interpreter at Ring 1.

~7K lines of C and Assembly, plus MuJS which I sto-borrowed.

Snake is 350 lines of freestanding C running at Ring 1 — direct VGA writes to 0xB8000, nonblocking keyboard input, speed scaling by score, and highscore persisted to /tmp/snake_hi through my own ext2 VFS. The JS runtime had other plans so C it was.

The rest of the userland (shell, coreutils, text editor) is JavaScript through int $0x80.

Active roadmap: IDE driver for persistent storage, NVMe support, sysfetch, and getting JS apps off baked-in string literals and onto actual disk.

Repo: https://codeberg.org/debaditya/NephilimOS

u/ObjectNo809 — 15 days ago