gitwtfhub

wtf is swift-os?

mweinbach/swift-os — explained in plain English

Analysis updated 2026-05-18

84SwiftAudience · developerComplexity · 5/5Setup · hard

TL;DR

A complete operating system, kernel and desktop included, written from scratch in Swift and run in an emulator.

Mindmap

mindmap
  root((SwiftOS))
    What it does
      Bare metal kernel
      Written entirely in Swift
      Boots in QEMU as Pi 5
    Kernel features
      SMP scheduler
      SwiftFS filesystem
      Networking stack
    Userland
      Window manager
      swish shell
      File manager and editor
    Tech stack
      Swift 6.2
      QEMU
      aarch64
    Audience
      Systems developers
      OS hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Study how an operating system kernel, scheduler, and filesystem work by reading a from scratch Swift implementation.

REASON 2

Boot a custom desktop environment with a terminal, file manager, and text editor inside QEMU.

REASON 3

Experiment with low level Swift programming outside of Apple's usual frameworks.

What's in the stack?

SwiftQEMUaarch64ARM

How it stacks up

mweinbach/swift-osthebriangao/pebbleeasychen/markmark
Stars848485
LanguageSwiftSwiftSwift
Setup difficultyhardmoderateeasy
Complexity5/53/51/5
Audiencedevelopervibe coderwriter

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires macOS on Apple Silicon, QEMU, and a specific pinned Swift 6.2 toolchain.

Wtf does this do

SwiftOS is a real operating system built entirely in the Swift programming language. It runs as a bare metal kernel on 64 bit ARM hardware, using a stripped down version of Swift with no standard library runtime, and it boots inside the QEMU emulator configured to look like a Raspberry Pi 5. Nothing borrows from Linux or from Apple's own frameworks. Every piece, from the disk driver to the window manager, was written from scratch in Swift by the project. The kernel side handles the basics an operating system needs: reading the hardware layout automatically instead of hardcoding addresses, running threads across all four CPU cores, managing memory, talking to a virtual disk through its own filesystem called SwiftFS, and networking with support for ping and DNS lookups. It can also power the virtual machine on and off for real, and it recovers cleanly from being killed mid write thanks to a journal that replays on the next boot. On top of that kernel sits a small desktop environment. There is a window manager with dragging, resizing, and minimizing, a taskbar and desktop icons, and a terminal emulator with command history and colored text. A custom shell called swish supports about 35 familiar commands such as ls, cat, grep, ps, and top, along with pipes and file redirection. Extra apps include a file manager, a text editor, and a system monitor that reads real data from the kernel, like CPU usage and memory allocation. To try it, you need a Mac with Apple Silicon, QEMU installed, and a specific Swift 6.2 toolchain. Running a build command compiles the kernel, and a second command boots it in a QEMU window where you can click around or type into the terminal, which starts already focused and ready for commands like neofetch or ls. The project is upfront about what is missing. It currently targets the QEMU virtual machine rather than real hardware, most work runs on a single CPU core by design, and full networking such as TCP is still on the roadmap alongside real hardware support.

Yoink these prompts

Prompt 1
Walk me through how the SwiftOS kernel boots from EL2 to EL1 and sets up memory.
Prompt 2
Explain how SwiftOS's SwiftFS filesystem journal recovers from a crash mid write.
Prompt 3
Help me set up the Swift 6.2 toolchain and QEMU so I can build and run SwiftOS.
Prompt 4
Summarize what the swish shell in SwiftOS can and cannot do compared to a normal Linux shell.

Frequently asked questions

wtf is swift-os?

A complete operating system, kernel and desktop included, written from scratch in Swift and run in an emulator.

What language is swift-os written in?

Mainly Swift. The stack also includes Swift, QEMU, aarch64.

How hard is swift-os to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is swift-os for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.