Skip to content

Version 0.19 · x86-64 · Rust no_std

An operating system, written from scratch.

AriCodeOS is a microkernel built in Rust with no Linux, BSD or any other kernel underneath. It boots through UEFI, gives each program only the capabilities it needs and runs storage, network and USB drivers as ordinary processes. From scratch means compared, not copied: where an established library measured better, as rustls or wasmi did, it is adopted (ADR 0063).

AriCodeOS architecture: isolated applications and drivers communicate through capabilities and IPC with the Rust microkernel, above x86-64 hardware.

Small kernel. Independent processes.

Inside the system

A driver stops. The system keeps going.

Isolation has a visible result. This real boot-test excerpt shows a failed driver restarting and an unauthorised memory read being stopped.

serial · qemu-system-x86_64 · 4 CPUs
[ INFO] AriBoot 0.9.0 (AriCodeOS UEFI loader)
[ INFO] slots: booting from slot A (image version 1)
[ INFO] ExitBootServices -> AriKernel

AriCodeOS booting...
[INFO ] vmm: own tables active, W^X on the image
[INFO ] smp: 4 CPUs online (3 of 3 APs started)
[INFO ] iommu: one domain per process with IOVA = physical
[INFO ] user: process 1 'init' created
[WARN ] user: process 3 'kernel_read' killed: #PF read
AriInit: crashy_driver crashed, restarting
AriInit: crashy_driver restarted successfully
ari>
Excerpt from the serial log of the boot.kernel_ready test scenario. init restarts a driver that crashes; the kernel kills a process that tries to read its memory.
35/35
roadmap phases implemented
290
automated QEMU scenarios
85
architecture decisions recorded
164k
lines of Rust

Design

Not a smaller Linux. A different starting point.

AriCodeOS keeps legacy out, moves privileges out of ring 0 and treats security as a property of the architecture rather than a layer added at the end.

A small kernel

Ring 0 keeps only what has to be there: scheduling, virtual memory, interrupts, IPC and capabilities. Everything else runs in user space.

Capabilities, not identities

Having an identity does not imply having access. A program can only touch a file, a device or the network if it holds a handle that allows it.

Drivers that are allowed to fail

virtio, xHCI, USB storage and the Realtek network card run as ring 3 processes. When one crashes, init restarts it and the kernel keeps running.

Memory safety by default

Rust no_std in the kernel, loader, drivers and services. Every unsafe block has to be justified, and W^X and NX are enforced from the first page table.

Updates that cannot brick it

Signed system images in A/B slots. The new slot is tried, confirmed by init or rolled back, and user data survives the rollback.

No legacy without a reason

UEFI only, 64-bit only: no BIOS, no ISA, no full POSIX. Old software may run on top one day; it will never define the kernel.

Architecture

Six layers, one rule: each part gets only what it needs.

06

Applications

Native programs · WebAssembly modules · future compatibility environments

05

Runtime and SDK

aricode-rt · Capability API · manifests · sandbox

04

User services

AriFS · network · compositor · supervisor · sshd

03

User-space drivers

virtio-blk · virtio-net · virtio-input · xHCI · USB HID · USB storage · Realtek r8169

02

AriKernel

scheduler · virtual memory · IPC · interrupts · capabilities · SMP

01

Hardware

x86-64 · UEFI · ACPI · APIC · PCIe · IOMMU

Status

What runs today

Every capability is backed by scenarios that boot the system in QEMU on each test run. Since 0.9, the core of it also runs on a 2012 laptop.

Validated on hardware

Running on a real laptop

The shell, the USB stick as system disk and wired networking; since 0.10, SSH, HTTPS and updates over the network, since 0.11, USB 2.0, since 0.14, updates straight from GitHub, since 0.18, the desktop, and since 0.19, the panel’s own resolution and the GPU’s engine.

Validated in QEMU

Processes, IPC and capabilities

Ring 3 processes, handles with rights and revocation, IPC with handle transfer and a sandbox per manifest.

Validated in QEMU

Storage that survives power cuts

AriFS with CRC32, an atomic replacement journal and end-to-end flush, tested with cuts injected in the middle of writes.

Validated in QEMU

SMP & IOMMU

Up to four CPUs with IPIs and TLB shootdown; Intel VT-d with one translation domain per driver.

Optional profile

A desktop worth the name

A toolkit of its own, menus, dialogs, a bar with a clock and a dock, and windows resized by their edges; five signed applications, each with a capability of its own, on top of the base system.

Open

What 0.19 leaves open

Signed driver packages, designed but not built; USB hubs and sticks plugged in after boot; on the Tiger Lake Lenovo, the new power-off and a DMA fault still to check; and ADR 0041, awaiting a decision.

AriCodeOS needs real machines

Try it in Docker or on a laptop you do not use and tell us what happened. A hardware report, a star or a question: every bit helps, and it only takes a free GitHub account.