Introduction
EDOS is a hobby operating system for x86_64, written 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 its own.
It is one person’s project. Treat it as something to read and run in a VM, not as something to keep data on.
The current release is v0.8.0. Anything before v0.3.0 loses file data on fragmented writes and should be replaced: EDOS zeroed a newly allocated block through the journal, and because file data goes straight to the device that copy could land on the block after the data.
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 and named pipes, PTYs, poll |
| Storage | EFS, an extent-based filesystem with a metadata journal, on AHCI with native command queuing and on NVMe. 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 | 132 programs built against a forked Rust std, including a shell with job control, globbing and scripting, a graphical editor with syntax colouring, a vi-like editor, a file manager, a pager, sed, strace, an SSH server, 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, and
svc starts and stops any of it at runtime.
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: 115,794 lines of Rust across 479 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, named pipes, 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