0.1.0 “quiet boye”
the first release of moonshot is out. i tagged it a few hours ago and pushed it to its own repository. it is called quiet boye. calling it a release is a way of saying this checkpoint is frozen and clean and someone who was not me could clone it and boot it and the tests would pass. that was not true two days ago. there were dead comments everywhere, a few pieces of dead code i had walked past for weeks, and a grep pattern in the main test script that only matched the second boot onward, so a completely fresh checkout would fail the first time you ran it. all of that is fixed now.
what is in it
the kernel boots through Multiboot and GRUB under QEMU on x86_64. it draws to a linear pixel framebuffer with its own hand-drawn bitmap font,the font covers printable ASCII and a handful of box-drawing glyphs, 128 characters total. rendered by punkt. on top of that sits kakel, a tiled windowing layer that can split the screen into independently scrolling windows, each with its own shell session. the shell, skalman, has tab completion, command history, arrow-key line editing, and over twenty builtin commands.
there is a text editor built into the kernel. skrift has syntax highlighting for c0, visual selection, yank and paste, forward search, undo, and a command mode with vi-like movement keys. it can run c0 expressions inline through the REPL and insert the results into the buffer as comments. i did not set out to build an editor. it happened because the shell needed a way to edit files, and one thing led to another.
the REPL, backed by a hand-written x86-64 JIT compiler, compiles c0 expressions to native machine code at runtime into an identity-mapped page with W^X toggling. it handles arithmetic, comparisons, variables, assignment, print, and control flow (if/else, while, for, break, continue). the JIT page is never simultaneously writable and executable, which is more than i expected to care about this early.
underneath, the kernel does preemptive multitasking through chrone, a round-robin scheduler driven by the PIT timer. memory is managed by jenna, which handles physical page allocation with LIFO reuse, four-level paging with demand-paging recovery, and a coalescing kernel heap. the filesystem, jakel, is an in-memory tree that persists to an ATA disk image and survives a reboot, with per-file owner and mode permissions and a multi-user login system.
ring-3 userspace is wired up and working. the GDT has user-code and user-data descriptors, the TSS holds a known-safe RSP0, EFER.SCE is enabled, and the LSTAR MSR points at a syscall entry trampoline. a test binary built in kscratch drops to ring 3, makes a syscall that writes to the framebuffer, and exits cleanly. it is a toy right now, but the whole path from userspace through the syscall handler and back is real and the tests catch regressions in it.
the repository is at github.com/cofflang/moonshot. the releases page has the download and boot instructions.