SaltyOS
SaltyOS is an operating system built on a capability-based microkernel. All resource access is mediated through unforgeable capability tokens. The kernel provides only scheduling, IPC, memory management, and capabilities — everything else runs in user space.
Components
SaltyOS is documented across four components:
| Component | Scope |
|---|---|
SaltyOS (this component) |
System-wide documentation: learning guides, build instructions, architecture overview. |
The microkernel: capability system, IPC, memory management, scheduling, syscalls, architecture backends. |
|
System library: kernel ABI wrappers, POSIX compatibility, ELF/PE loaders, Win32 shim. |
|
C/C standard library: libc.so (basaltc), optional libc. |
New to OS Development?
Start with the Learning Guides. They explain operating system concepts from scratch, using SaltyOS as a concrete example. No prior kernel experience required — just programming knowledge.
-
What Is a Microkernel? — monolithic vs micro, trust boundaries, where SaltyOS fits.
-
Capabilities 101 — capability-based access control explained with analogies.
-
IPC Explained — how processes communicate in a microkernel.
-
Memory Explained — physical memory, virtual memory, page tables, and the four-tier model.
-
Threads and Scheduling — CPU sharing, EDF, budget enforcement.
-
Building and Running — custom toolchain, bootstrap, QEMU, UTM.
After the learning guides, continue with the kernel reference:
-
Syscall Walkthrough — follow a syscall through the kernel step by step.
-
First Contribution — make your first kernel change.
System Architecture
┌─────────────────────────────────────────────────────────┐ │ Applications │ │ bash · nano · python · test_runner · hello_pe │ ├──────────────────────────┬──────────────────────────────┤ │ POSIX Personality │ Win32 Personality │ │ posix_ttysrv │ win32_csrss │ │ posix_getty │ kernel32.dll shim │ ├──────────────────────────┴──────────────────────────────┤ │ System Servers │ │ init · objsrv · procmgr · vfs · mmsrv · namesrv │ │ netsrv · dnssrv · pcidrv · blkdrv · netdrv · dispdrv │ ├─────────────────────────────────────────────────────────┤ │ Libraries: trona (Rust) · basalt (C/C++) │ │ Runtime linkers: ld-trona.so · ld-trona-pe.so │ ├─────────────────────────────────────────────────────────┤ │ kernite │ │ cap/ · ipc/ · mm/ · sched/ · syscall/ · arch/ │ ├─────────────────────────────────────────────────────────┤ │ Hardware (x86_64 / aarch64) │ └─────────────────────────────────────────────────────────┘
Kernel (kernite)
The kernel is ~27,000 lines of Rust (#![no_std], no alloc).
It provides four services:
-
Capabilities — unforgeable tokens that mediate all resource access.
-
IPC — synchronous endpoints and asynchronous notifications.
-
Memory — four-tier model: PMM / Untyped / MemoryObject / VSpace.
-
Scheduling — EDF with budget enforcement and priority inheritance.
System Servers
All OS services run as unprivileged user-space programs:
| Server | Role |
|---|---|
|
Service-based multi-phase bootstrap. Reads |
|
Object authority server: allocates kernel objects (TCB, SchedContext, CNode, etc.) from untyped memory, manages CSpace expansion for child processes. Starts before |
|
Memory manager: MO lifecycle, demand paging, VSpace mapping. |
|
Process manager: spawn, fork, exec, exit, waitpid, signal delivery. |
|
Name service: endpoint discovery for servers. |
|
Virtual filesystem: ramfs, devfs, pipes, sockets, shm, procfs, poll. |
|
Serial console I/O via IoPort capabilities. |
|
TCP/UDP/ICMP network stack (smoltcp). |
|
Caching DNS resolver. |
|
PCI enumeration (I/O port + ECAM). |
|
Block device driver (virtio-blk). |
|
Network device driver (virtio-net). |
|
Framebuffer display driver. |
|
SaltyFS filesystem server (COW, B-tree, snapshots). |
Multi-Personality
SaltyOS runs POSIX and Win32 applications side by side:
-
POSIX:
posix_ttysrv(PTY/line discipline),posix_getty(login prompt). Full signal, socket, pipe, mmap support. -
Win32:
win32_csrss(console subsystem + import resolver), PE/COFF loader, kernel32.dll shim.
Libraries
-
trona (Rust): 5-crate system library — substrate (kernel ABI), posix (POSIX API), loader (ELF/PE), uapi (constants/protocols), win32 (Win32 shim).
-
basalt (C/C): `libc.so` (40 Rust modules implementing POSIX stdio, stdlib, string, etc.), optional `libc.so`.
Custom Toolchain
SaltyOS builds a patched LLVM/Clang/LLD and Rust compiler that target x86_64-unknown-saltyos and aarch64-unknown-saltyos.
See Building and Running for setup instructions.
Quick Start
git clone --recursive https://github.com/SaltyOS/saltyos.git
cd saltyos
just bootstrap # Build toolchain + OS (~2 hours from scratch)
just run # Boot in QEMU
just run --utm # Boot in UTM (macOS)
See Building and Running for detailed instructions, prerequisites, and troubleshooting.