Introduction
EDOS is a hobby operating system for x86_64, written from scratch in Rust. It boots on UEFI, brings up every core on the machine, and starts a compositing desktop with a terminal. The scheduler, the filesystem, the network stack, the USB stack and the window system are all original code.
It is one person’s project. Treat it as something to read and run in a VM, not as something to keep data on.
What runs today
Section titled “What runs today”| Area | What exists |
|---|---|
| Kernel | SMP preemptive scheduler with per-CPU run queues and work stealing, demand paging, copy-on-write fork, TLB shootdown IPIs, futexes, signals, pipes, PTYs, poll |
| Storage | EFS, an extent-based filesystem with a metadata journal, on AHCI with native command queuing. Page cache, block cache, write-back gated on journal commits, read-ahead |
| Network | Ethernet, ARP, IPv4 with fragment reassembly, ICMP, UDP, a TCP state machine, DHCP and DNS |
| Graphics | virtio-gpu driver, a userspace compositor, window decorations, shared-memory buffers, a hardware cursor |
| USB | xHCI, with HID keyboard and mouse and mass storage |
| Audio | Intel HDA behind a /dev/dsp node |
| Userspace | 75 programs built against a forked Rust std, including a shell with job control and scripting, a vi-like editor, an installer, and the usual coreutils |
The kernel starts exactly one process, bin/edos-init. Everything else, including the
window manager, the taskbar and the terminal, is init’s policy, running in userspace.
What it is not
Section titled “What it is not”- Not multi-user. There are no accounts, no permission checks, and no privilege separation between programs.
- Not a POSIX system. It implements the syscalls its own userspace needs, which is a large subset of shapes you would recognise, not the standard.
- Not crash-safe for file data. The journal covers metadata only; EFS has
data=writebacksemantics. - Not widely tested on real hardware. It runs on the machines it has been tried on. See On real hardware.
Where to go next
Section titled “Where to go next”- Running it: boot it in QEMU in a couple of commands.
- Building from source: including the custom Rust toolchain userspace needs.
- Architecture: the boot path and how the pieces fit together.
- The source: 72,777 lines of Rust across 335 files.
The tree
Section titled “The tree”kernel/ no_std kernel crate, target x86_64-unknown-none src/memory/ frame allocator, page tables, VMAs, COW, TLB shootdown, shared memory src/thread/ scheduler, context switch, blocking and preempt-aware locks, waitqueues, pipes, PTYs, poll, signals, futexes src/fs/ VFS, EFS, FAT32, memfs, devfs, procfs, page cache, journal, writeback, readahead src/drivers/ ahci, e1000e, xhci, hda, virtio-gpu, hpet, pci, msi src/net/ ethernet, ARP, IPv4, ICMP, UDP, TCP, DHCP, DNS src/syscalls/ SYSCALL/SYSRET entry and dispatch src/window/ window registry and input routingprograms/ userspace workspace, target x86_64-unknown-edos, links real stdlibs/ crates shared between the kernel and host toolstools/ host-side: efs-mkfs, efs-fsckdoc/ specs, invariants, post-mortems