Skip to content
CathedralOSPublic

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Repository files navigation

Cathedral

Cathedral is an operating system with instant file searches, strict performance requirements, and virtually no malware by design. The user is sovereign; no software can do anything except that which it has been granted.

Malicious software goes no further than the files, network access, and devices it was given. Every one of those permissions can be revoked. By default, these permissions are incredibly scoped. Apps cannot go poking where they do not belong.

Apps can be arbitrarily sandboxed, at almost no cost, by running them in cheap operating system clones called Matrices.

This is made possible by the underlying filesystem database, which allows for near-free copying and searching, and prevents data corruption. This also means 'cloning all system' is free, giving apps the illusion of their own environments.

Cathedral supports update-in-place, removing the need for the vast majority of "restart to update" prompts that plague legacy operating systems.

Pre-alpha. Cathedral's Omega kernel has booted under controlled QEMU/OVMF, left firmware, retained its memory roots and installed a 33-entry exception/timer table. Ordinary code observed eight advancing timer wakes; a separate stopped run checked eight interrupt returns, CPU state and retained guards. The boot frontier and qualification record the exact image and conditions. The final build from reviewed Git dependencies reproduced the qualified image and passed both fresh boot checks. Persistent kernel address-space activation, scheduling, a desktop and real-hardware support remain unfinished. The executable Rust lab is a separate implementation.

Documentation map · Specification · Design · Boot walkthrough · Work index · Rust implementation handoff

The Omega UI component source and Rust app API are included in this checkout. See the UI build guide for compiler setup and composing an app's own interface.

Solved problems

Legacy OS Cathedral How
Copying large folders takes an eternity Copying is instant, regardless of size. You pay when the copy changes or moves to another device. Copy-on-write. The folder tree is decoupled from storage.
Searching files is slow Search and filter run at database speed. Files live in a database.
A crash or power loss corrupts your files You land at the last consistent commit. Any object rolls back to the state before a bad change. Storage is one transactional, versioned object store. Filesystem as database
Backups are manual Files get automatic history checkpoints and can replicate across your drives. Versioning is free under copy-on-write.
Updates need a reboot Drivers, services, and compatible core changes hot-swap live, with rollback. A change that cannot prove a safe live path defers to reboot. State migrates through checked code at a quiet point. Updates and hot swap
Malware and ransomware A compromised program, a backdoored dependency, or a hijacked agent can damage only the data it was granted. Each grant is attributable and revocable. No ambient authority. Capability model
A buggy driver takes the machine down It takes its device down, then restarts. Drivers are confined user-mode components behind a mandatory IOMMU. Driver model
System files clutter the disk The disk is yours. System files live in their own realm, and each app owns a realm under its binary. Storage is partitioned into capability-rooted realms with no global root.
Sandboxing needs a container runtime or a guest OS A nested Cathedral, called a Matrix, is the sandbox. The desktop itself is one. A Matrix owns everything its children can see. Sandboxing
An agent with your keys can leak them An agent holds the right to use a secret, never its bytes. A prompt-injected agent cannot exfiltrate what it never held. The worst case is "use this key, read-only, rate-limited, inside this sandbox." Secrets are capabilities. Agents as principals

Because the desktop is itself a Matrix, malware cannot tell whether it is sandboxed. Everything is.

Architecture

Everything above follows from one rule: authority is a capability a program holds, never something it gets for free by being run. Cathedral is written in Omega, a language built alongside it that checks who holds what at compile time, so the rule holds by construction rather than by convention.

Every part of the system is either proved or caged. The core is written in checked Omega and trusted in full. It is what builds the cages, so nothing sits above it to confine it. Everything else, drivers included, is confined by hardware and holds only the capabilities it was granted.

flowchart TB
    firmware["UEFI firmware"] -->|"one root extent"| core["Proved core<br/>capabilities, memory and IOMMU, scheduling, artifact admission"]
    core -->|"capabilities"| desktop
    subgraph desktop["Matrix: the desktop"]
        services["Services"]
        drivers["Drivers<br/>user mode, behind the IOMMU"]
        app["App<br/>holds only what it was handed"]
        subgraph sandbox["Matrix: a sandbox"]
            untrusted["Untrusted app"]
        end
    end
    drivers -->|"DMA through the IOMMU"| device["Device"]
Loading

A Matrix is a nested Cathedral. It owns everything its children can see: their files, devices, clock, and network. The desktop is a Matrix, a sandbox is a Matrix, and a Matrix inside a sandbox is one more level of the same thing. System files are shared into each one read-only, so a new Matrix costs a set of grants rather than a guest OS. Virtual machines stay around for foreign operating systems.

The bet

Every OS domain has a legacy contract, and most of them cannot answer a simple question: who can do what, why, through which path, and can I revoke it safely? Cathedral answers it by construction. Omega makes authority, effects, protocols, and state evolution visible to the compiler before a byte is emitted, so each contract is rebuilt on top of that instead of bolted on.

That means rebuilding every contract, not one:

Domain Legacy contract Cathedral contract
Authority Users, groups, ACLs, sudo, seccomp, namespaces, all at once One capability model. Nothing ambient.
Storage A tree of byte files under a global root A content-addressed database of typed objects, split into capability-rooted realms
IPC Pipes, sockets, signals, dbus, each its own kernel mechanism One capability-scoped shared region. Every pattern is a library over it.
Drivers Kernel mode, trusted, one bug from a panic Confined user-mode components behind an IOMMU
Isolation Containers and guest kernels Nested Matrices. Virtual machines only for foreign operating systems.
Updates Replace files, reboot Declarative, hot-swappable state transitions with rollback
The core A monolith you cannot replace while running A small proved core whose components hot-swap where a safe live path can be proved

One technique here shares ground with Theseus: a single address space with language-level isolation and live component replacement, used for the proved core. It is one idea in Cathedral, not the thesis.

Repository layout

To boot the Omega kernel, select Cathedral (Omega): Build & Boot in QEMU in VS Code's Run and Debug menu and press F5. This opens QEMU and reports kernel bring-up progress in the editor terminal; it is not yet a desktop. See the Omega launch setup for compiler, Python and firmware prerequisites.

The Rust lab mirrors the Omega ownership layers under source-rs/ for executable OS bring-up experiments. Press F5, or run python tools/boot-harness-rs/run.py --release --window, to open the desktop and choose programs. python tools/boot-harness-rs/run.py --smoke runs the separate kernel proof suite. TASKS_RUST.md records current context and next work for that implementation. Its hardware operations are explicitly unsafe; it does not carry the Omega implementation's proof guarantees.

wiki/          specifications, design, architecture, explainers, proposals, drafts
source/
  contracts/   the frozen ABI
  kernel/      boot, core mechanisms and CPU architecture
  platform/    shared services, device drivers and libraries
  distribution/ Cathedral's built-in distro: composition and future desktop
tools/         host-side tooling that never ships
source-rs/     Rust bring-up lab, mirroring source/ layers as code lands

Both source trees have one distribution/, whose boot profile is consumed by the corresponding harness. Its future shell, settings and applications build on the shared platform; kernel and platform never import distribution code. A fork can replace that directory. foundation/ and unimplemented desktop/services directories appear with their first real code. See the layout, TCB and ADR 0002. The discoverability guide maps executable entrances and the rules for keeping each level navigable. Run python tools/source-layout/check.py to check the implemented boundaries.

Documentation

Start at the documentation map. It separates what is promised (the specification) from why (design) and from what is still being explored (proposals, drafts, speculation). The design index has the reading path and the chapter map.

Relationship to Omega

The two repositories evolve together. Omega supplies the proof, effect, capability, and versioned-data machinery. Cathedral is the first system large enough to put real pressure on it. Where a chapter needs a language feature Omega does not have yet, it says so and links the Omega chapter.

The chapters Cathedral leans on most:

About

No description, website, or topics provided.

Resources

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages