Inside LarzOS: An Operating System Written in Larzscript
2026-08-01 ยท Larzscript
Larzscript is a real, general-purpose, money-native language โ and the project pushes that idea further than most languages ever get pushed: there's an operating system, LarzOS, whose init process, shell and userland utilities are written in it.
Two layers, one language
LarzOS actually exists at two levels:
- A Linux userland (Stage 0), working today.
os/init.lzprovisions the system and drops you intolarzsh, a full shell โ also written in Larzscript โ with real commands (grep,head,wc,edit,ps,top, networking tools) andimport-able packages, running on top of a normal Linux kernel. - A freestanding, bare-metal kernel. A Multiboot-compliant x86-64 kernel (written in C, hosting the same Larzscript interpreter) that boots on its own โ no Linux underneath โ with a real VGA-mode GUI desktop, its own compositor, PS/2 keyboard and mouse drivers (including scroll-wheel support), and a real RTL8139 network driver with its own ARP/IPv4/ICMP/DNS/HTTP stack.
larzshruns as the shell inside that GUI, in a terminal widget with ANSI colors, backspace-aware line editing and real scrollback.
You can boot the bare-metal build yourself in QEMU today โ it's a downloadable ISO, no installation onto real hardware required to try it.
Money-native at the kernel level
The point of building an OS in Larzscript isn't novelty for its own sake โ it's that the language's money primitives (wallet, gas, require) become properties of the *system* itself, not just of one app running on it:
fn scan() gas 500 { return 1 }
The same gas-metering mechanism that caps a function's compute budget in a normal script is used inside the kernel's own shell to meter compute against a wallet โ and it fails closed there too, exactly like it does in userland Larzscript.
What's actually built vs. what's roadmap
Being direct about the current state, since this is real infrastructure, not a demo:
- Built and working today: the freestanding kernel boots via QEMU, renders a GUI desktop, drives a real NIC, and runs
larzshand dozens of Larzscript packages (from JSON/HTTP/crypto to money-native ones like invoicing and currency conversion) inside a fixed 8 MiB kernel heap. - Known, honestly-documented limitation: that 8 MiB heap is small enough that a handful of heavy, loop-intensive packages (real SHA-256, for instance) are excluded from the kernel build and kept userland/hosted-only rather than force-fit in a way that would silently break.
- Roadmap: the [project's own roadmap](https://github.com/larz-scripter/larzscript) describes lifting this same userland onto real hardware โ laptops and servers, not just QEMU โ as the next stage. That work isn't independently verified on physical hardware yet, and it isn't claimed here as done.
Why this matters even if you never boot it
Most languages that claim to be "money-native" mean a payments library got imported. Building an actual kernel and shell in Larzscript is a stress test of the opposite claim โ that wallet/pay/gas hold up as real language primitives even at the level of an operating system's own init process, not just inside a web app.
Go deeper
- What is Larzscript? โ the language itself, without the OS.
- How gas metering works โ the same mechanism used in the kernel above.
- Try the playground โ no install, runs the real interpreter in your browser.