Hamnix logo
one userland, two kernels

Hamnix

A complete userland — PID 1, the shell, the window system, the compositor, the desktop, the file manager, the package manager — written in Adder, a Python-syntax systems language with its own compiler.

It runs on a from-scratch x86_64 kernel with Plan 9-shape namespaces, and it runs on a stock Linux kernel. Same programs, two floors under them.

2kernels the userland runs on
1.0.22Hamnix Linux, live now
224packages served from this site
0lines of C in the native kernel

Two things, sharing everything above the kernel

The userland is the product. The interesting question was never "can you write a kernel" — it was whether one set of programs can sit on a from-scratch kernel and on Linux without becoming two codebases. It can, and these are the two results.

Hamnix Linux — the one you can run

The same Adder userland on a stock Linux kernel. An Adder PID 1 builds the namespace, hamsh runs the boot scripts, and you get a desktop. It installs itself onto UEFI + ext4 and updates from this site with Ed25519-signed packages — 124 of them, at 1.0.22 today. The tested path is a virtual machine; a native install onto real hardware is in progress.

Hamnix (native) — the radical one

A from-scratch x86_64 operating system: its own kernel, drivers, filesystems and network stack, with zero lines of C in the kernel. Plan 9-shape namespaces at the syscall layer — no BSD sockets at all, TCP and TLS are the /net file tree — and a Linux ABI shim above them, so Debian binaries run inside enter linux { … } on the same kernel.

What the shared userland is

Everything in this list is written in Adder and is the same code on both kernels.

A shell and an init

hamsh — Python-syntax, with job control and a service supervisor — is PID 1's first exec and the thing that runs the rc scripts.

A window system that is a file server

Each window is a display list in /dev/wsys, not a socket protocol. The compositor reads files; the kernel owns no pixels.

A desktop

Panel, taskbar, workspaces, a categorised Applications menu with search and favourites, a file manager, a terminal, a text editor and a system monitor.

A web engine

HTML, CSS and a JavaScript engine written from scratch and measured against the Web Platform Tests. It renders real pages; it is not a Firefox replacement, and both pages say where it stands.

A package manager

hpm — binary packages, Ed25519-signed indexes, a dependency solver, Debian-shape channels. It fetches from this very site.

A language and a compiler

Adder has Python's syntax and a systems language's semantics. A hand-written x86_64 backend compiles the native kernel and doubles as the differential oracle; an LLVM backend builds the userland.

Package repository

This site is also the live hpm repository. Top-level directories are channels, mirroring Debian's split. hpm reads each channel's index.json — whose Ed25519 signature it verifies against a compiled-in key — and fetches packages by URL and SHA-256.

ChannelIndexContents
linux linux/index.json Hamnix Linux — the Adder userland on the Linux kernel. 124 packages at 1.0.22: init and the boot scripts, the shell, the desktop, the applications, the Adder toolchain, the manual pages and the boot-critical kernel modules.
main main/index.json Hamnix (native) — first-party, free software. 100 packages: one per CLI tool, plus the hamnix-base metapackage, the bootloader, installer tools and a curated Debian rootfs tree.
non-free non-free/index.json Reserved for software whose licence is not DFSG-free. Empty placeholder; opt in with hpm channels enable non-free.
non-free-firmware non-free-firmware/index.json Reserved for redistributable firmware blobs. Empty placeholder.
# on a running Hamnix system
hpm refresh
hpm search editor
hpm install hamnix-base

An installed native system carries an on-disk mirror of the packages outside the base set, so hpm keeps working with no network at all.

Source & contact

Repositories

HamnixOS/hamnix-linux — the Linux distribution.
HamnixOS/Hamnix — the from-scratch OS, the language and the compiler.
HamnixOS/packages — this site and the package channels.

Where to start reading

architecture.md for the layering, native-api.md for the syscall surface, and the Adder guide for the language.

Reports welcome

Boot logs from physical machines — especially ones that fail — and pages the browser renders badly are the most useful things anyone can send. Open an issue.