SynapseOS A complete OS built from nothing.
No libc. No POSIX. No runtime dependencies. SynapseOS boots from UEFI firmware and delivers a full graphical desktop, web browser, filesystem, networking stack, and TLS cryptography — all running at ring 0 in a single kernel image.
A full desktop environment,
straight from the kernel.
SynapseOS boots directly into a double-buffered compositor with macOS-style windows, a dock, desktop icons, and a menu bar — rendered entirely in ring 0 with no display server, no GPU driver abstraction, and no intermediate framework.
-
🖼
Double-Buffered Compositor
Back-buffer → physical framebuffer swap eliminates visible tearing at any resolution.
-
🪟
Window Manager
Traffic-light buttons, draggable windows, Z-order focus switching. Up to 16 simultaneous windows.
-
🎨
Catppuccin Mocha Theme
The same palette used by the OS itself — deep navy backgrounds, soft pastels, and smooth gradients.
-
📐
EDID-Aware Scaling
UI scale factor computed from monitor physical dimensions queried via the Limine framebuffer EDID response.
boot etc home EFI
alice@synapse : ~ $ ping 10.0.2.2
ICMP echo-reply from 10.0.2.2 seq=1
A browser built
inside the kernel.
Navigator is a fully functional multi-tab web browser running in ring 0. It parses HTML, applies CSS, lays out the DOM, and renders to the framebuffer — with TLS 1.2 HTTPS support powered by a custom X25519 + AES-128 implementation.
-
🔒
HTTPS via TLS 1.2
X25519 key exchange, AES-128-CBC, HMAC-SHA256. Full TLS record layer over TCP sockets.
-
🌐
HTTP/1.1 Client
Persistent connections, chunked transfer encoding, redirect following, status codes.
-
📄
HTML + CSS Engine
Tokenizer, DOM tree, CSS cascade, block/inline layout engine, framebuffer renderer.
-
🗂
Multi-Tab Interface
Tab bar, address bar with editing, back/forward history, status bar with progress indicator.
for modern developers
Ethernet to TLS,
zero dependencies.
From the RTL8139 NIC driver at the bottom to the TLS 1.2 client at the top, every networking layer in SynapseOS is hand-written kernel C. No lwIP. No mbedTLS. No external libraries.
-
🔌
RTL8139 NIC Driver
PCI scan, MAC read, ring buffer TX/RX, IRQ handling.
-
📡
ARP / IPv4 / ICMP
ARP cache, echo reply/originate, IPv4 checksum, full packet build/parse.
-
🔗
TCP Sockets
BSD-style
sys_socket/connect/send/recvAPI. Blocking connect with timeout. -
🛡
TLS 1.2 + X25519
Montgomery ladder over GF(2²⁵⁵−19), constant-time cswap, AES-128-CBC-SHA256 record layer.
Every subsystem, hand-crafted.
From the bootloader protocol layer to the MP3 decoder, every component is written in bare-metal C — no external libraries, no OS abstractions.
Preemptive Scheduler
Priority-weighted round-robin with PIT-driven context switches. Full GPR save/restore via inline assembly. Up to 32 concurrent tasks.
FAT32 + VFS
Boot-time FAT32 loader with LFN support. RAM-backed VFS with POSIX-style permissions (uid/gid, mode bits, chmod/chown).
AES · SHA · HMAC
FIPS 197 AES-128, FIPS 180-4 SHA-256 and SHA-1, RFC 2104 HMAC. All in pure integer C — no SSE, no hardware acceleration.
VT100 Terminal
80×24 emulator with full SGR color codes, escape sequences, scrollback, command history, and all built-in shell commands.
Intel HDA Audio
PCI HDA controller driver with WAV and MP3 playback (minimp3). MIDI synthesis via PC speaker fallback. Boot jingle on startup.
kmalloc Heap
First-fit doubly-linked free list over a 192 MB static BSS array. Split on alloc, coalesce on free. 16-byte alignment guaranteed.
Disk Installer
Writes MBR partition table, FAT32-formats the partition, copies kernel ELF and UEFI bootloader blob, writes limine.conf.
Setup Wizard (OOBE)
7-step first-boot wizard: welcome, keyboard, user/hostname, timezone, theme picker, optional install, summary.
ACPI + EDID
RSDP→RSDT/XSDT table parsing for MADT. EDID query for physical monitor dimensions to drive adaptive UI scaling.
One address space. All ring 0.
SynapseOS is a monolithic kernel. Every component — drivers, GUI, browser, crypto — executes at CPL 0 in a single virtual address space mapped by Limine at boot.
What's implemented.
Every component is kernel C. Statuses reflect the current release.
Cryptography written from scratch.
Every crypto primitive is implemented in pure integer C — no SSE, no libc, no external dependencies. Verified against FIPS and RFC test vectors.
AES-128 Block Cipher
FIPS PUB 197 compliant. Column-major state layout. Full key schedule (10 rounds, Rcon-based). SubBytes, ShiftRows, MixColumns, AddRoundKey and all inverses. Used by TLS 1.2 in CBC mode.
SHA-256 + SHA-1
FIPS PUB 180-4 compliant SHA-256 and SHA-1. Used for TLS 1.2 PRF, HMAC-SHA256 record MAC, and general-purpose hashing. Integer-only — zero FPU dependency.
HMAC (SHA-256 / SHA-1)
RFC 2104 HMAC construction parameterized over both SHA-256 and SHA-1. Used for TLS 1.2 MAC, key derivation PRF, and authentication contexts in the browser.
X25519 Key Exchange
Montgomery ladder over GF(2²⁵⁵−19) using 16-limb signed 64-bit arithmetic. Constant-time conditional swap (gfcswap). Used for TLS 1.2 ECDHE — the same algorithm as modern HTTPS.
Unix Permission Model
Full uid/gid/mode_t permission bits (rwxrwxrwx). VFS access checks against owner/group/other. chmod and chown APIs. Root bypass (uid 0). Up to 8 user accounts.
TLS 1.2 Handshake
Full TLS 1.2 client: ClientHello, ServerHello, Certificate, ServerHelloDone, ClientKeyExchange, ChangeCipherSpec, Finished. Cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (0xC027).
Zero to desktop in milliseconds.
Every initialization step is logged to serial. If anything fails, the kernel halts with a clear message rather than limping along.
BOOTX64.EFI from the ESP. Limine sets up a 64-bit page table environment, HHDM, and hands off to the kernel entry point with interrupts disabled.P + hhdm_offset without custom page tables.STI). Intel HDA probed via PCI scan. Boot jingle played. Control handed to the GUI main loop — which never returns.The toolchain behind the kernel.
Built with the same tools used for production OS development. Zero abstraction layers.
Up and running in minutes.
One make command downloads Limine, compiles the kernel, and produces a bootable ISO.
CFLAGS := -target x86_64-unknown-none-elf \
-ffreestanding \\
-fno-stack-protector \\
-fno-PIC \\
-mno-sse -mno-sse2 \\
-mno-red-zone \\
-mcmodel=kernel \\
-O2 -g -Wall -Wextra
# Linker flags (lld)
LDFLAGS := -nostdlib -static \\
-z max-page-size=0x1000 \\
-T kernel/linker.ld
# Entry point → kernel virtual base
# 0xFFFFFFFF80000000 (-mcmodel=kernel)
brew install llvm lld xorriso qemu
# Build — downloads Limine on first run
make
# Run in QEMU (UEFI mode)
make run
# Flash to USB and boot on real hardware
sudo dd if=uefi-demo.iso of=/dev/sdX \
bs=4M status=progress
-
1
Install prerequisites
Clang/LLVM, ld.lld, xorriso, and QEMU. The Makefile auto-detects
x86_64-elf-gccas an alternative. -
2
Run
makeLimine 8.6.0 is downloaded (~2 MB) on first build. Kernel ELF is compiled, linked, and staged into
iso_root/. -
3
ISO is created
xorriso wraps the kernel and bootloader into a hybrid UEFI + BIOS bootable ISO image at
uefi-demo.iso. -
4
Boot in QEMU or on hardware
make runlaunches QEMU with OVMF UEFI. Serial output appears in the terminal. Use-s -Sfor GDB debugging. -
5
Flash to USB for real hardware
Write with
dd, disable Secure Boot in firmware, and boot from USB. Legacy/CSM BIOS mode also works.
Where SynapseOS runs.
Primary target is UEFI x86_64. Legacy BIOS and physical USB boot are fully supported.
QEMU (UEFI)
Q35 machine with OVMF. Full feature set including NIC (RTL8139), USB keyboard, Intel HDA audio, and ATA disk for installer testing.
Real Hardware (USB)
Write with dd to any USB drive. Boot in UEFI mode. EDID queries physical display dimensions for adaptive scaling.
QEMU (BIOS Legacy)
Limine BIOS path via limine-bios.sys. make run-bios. Useful for testing on machines without UEFI or with Secure Boot.
192 MB heap. HHDM. No page allocator.
SynapseOS uses Limine's Higher Half Direct Map to reach every physical byte without managing page tables, and a first-fit doubly-linked heap for dynamic allocation.
Virtual Address Space Layout
·
0xFFFF800000000000
·
0x0000000001000000
HHDM formula:
Physical address P
→ P + hhdm_offset.
No custom page tables needed anywhere in the kernel.
Heap Allocator Design
First-Fit Algorithm
Walk the free list forward; take the first block ≥ requested size. Amortized O(n).
Block Splitting
If remainder ≥ MIN_BLOCK_SIZE (64B), it's split into a new free node — minimises waste.
Coalescing on Free
kfree() merges adjacent free blocks left and right — prevents fragmentation.
Magic Guard Header
Every block carries magic = 0xDEADBEEF. Mismatch on free signals corruption before it spreads.
Preemptive round-robin. Assembly context switch.
The scheduler hooks into PIT IRQ0. On every tick it saves the full GPR set in inline assembly, picks the next READY task, and restores its context — all before the IRET returns.
UNUSED
Slot free
READY
Queued to run
RUNNING
On CPU now
BLOCKED
Waiting on I/O
ZOMBIE
Returned; cleanup pending
Context Switch — Inline Assembly
__asm__ volatile(
"movq %%rsp, %0\n\t"
"movq %%rbp, %1\n\t"
"movq %%rbx, %2\n\t"
"movq %%r12, %3\n\t"
"movq %%r13, %4\n\t"
"movq %%r14, %5\n\t"
"movq %%r15, %6\n\t"
: "=m"(from->rsp), "=m"(from->rbp),
"=m"(from->rbx), "=m"(from->r12),
"=m"(from->r13), "=m"(from->r14),
"=m"(from->r15)
: : "memory"
);
/* Capture resume RIP: return address already on stack */
uint64_t ret_addr;
__asm__ volatile(
"movq (%%rsp), %0" : "=r"(ret_addr)
);
from->rip = ret_addr;
Priority Time-Slicing
Each task has a priority
and a slice
counter. On each PIT tick, the slice decrements. When it hits zero, a context switch fires.
Higher priority = larger initial slice = longer runtime before yielding.
Task 0 (boot thread) is permanent. A ZOMBIE task is cleaned on the next scheduler tick after it returns from its entry function.
VFS + Unix permissions + FAT32 at boot.
A flat inode table provides a POSIX-style path namespace. FAT32 is loaded into RAM at boot with full Long File Name support and cluster-chain following.
Permission Bits (mode_t)
S_IRUSROwner read (0400)S_IWUSROwner write (0200)S_IXUSROwner exec (0100)S_IRGRPGroup read (0040)S_IWGRPGroup write (0020)S_IXGRPGroup exec (0010)S_IROTHOther read (0004)S_IWOTHOther write (0002)S_IXOTHOther exec (0001)elif (uid == inode.uid) → check USR bits
elif (in group inode.gid) → check GRP bits
else → check OTH bits
FAT32 Boot-Load Pipeline
VFS Limits
Intel HDA. MP3. MIDI. Boot sound.
SynapseOS drives an Intel HDA controller from PCI discovery to sample playback, with a header-only MP3 decoder and PC speaker MIDI fallback.
HDA Playback Pipeline
/home/user/Music/track.mp3
If no HDA controller is found, drivers/midi.c
toggles the PC speaker at note frequencies — square-wave MIDI synthesis on any x86 machine.
Media Capabilities
wav2c.py; plays immediately after STI.bin2c.py.Zero libc. Every flag has a reason.
The build system uses a precisely chosen set of flags that strip everything the kernel doesn't need — and would break if it had.
| -target x86_64-unknown-none-elf | Freestanding ELF64 — no OS ABI, no startup files, no default runtime libraries |
| -ffreestanding | Don't assume the standard C library is present; don't link crt0 |
| -fno-stack-protector | No __stack_chk_guard symbol — it doesn't exist in a freestanding environment |
| -fno-PIC | Position-independent code is incompatible with the kernel code model |
| -mno-sse / -mno-sse2 | SSE registers aren't saved on interrupts; using them in IRQ handlers corrupts task FPU state |
| -mno-mmx / -mno-80387 | Same reason — no x87 or MMX in interrupt context anywhere in the kernel |
| -mno-red-zone | The 128-byte red zone below RSP is clobbered by hardware interrupts in kernel mode |
| -mcmodel=kernel | All code and static data must fit in the upper 2 GB (0xFFFF800000000000–0xFFFFFFFFFFFFFFFF) |
| -nostdlib | Linker: don't link any standard libraries (no libc, no libgcc startup) |
| -z max-page-size=0x1000 | 4 KB alignment required by UEFI; LLD's default 2 MB breaks Limine's load |
| -O2 -g | Optimise for production; retain DWARF debug info for GDB kernel debugging |
No libc
All string ops, memory functions, and snprintf are in kernel/lib/string.c — 100% freestanding C.
No startup files
No crt0, no _init, no atexit. The Limine entry stub _start is the first code that ever runs.
No FPU in kernel
Integer-only arithmetic throughout. No float, no double. FPU state is never saved on any interrupt path.
From first boot to full desktop.
The OOBE wizard mirrors modern consumer OSes — a polished 7-step flow before the desktop launches.
SynapseOS vs other hobby kernels.
Most hobby OS projects stop at a framebuffer or a shell. SynapseOS goes all the way to TLS, a browser, and a disk installer.
| Feature | SynapseOS | Typical Hello-World OS | OSDev Tutorial OS |
|---|---|---|---|
| UEFI boot | ✓ Limine protocol | ✗ BIOS only | ~ Sometimes |
| Graphical GUI + window manager | ✓ Full compositor, dock | ✗ None | ✗ None |
| Web browser | ✓ HTTP/HTTPS, HTML/CSS | ✗ No | ✗ No |
| TLS / cryptography | ✓ AES, SHA, X25519 | ✗ No | ✗ No |
| FAT32 filesystem with LFN | ✓ Full load + unix perms | ✗ No | ~ Read-only sometimes |
| Network stack | ✓ ARP / IPv4 / TCP / ICMP | ✗ No | ~ Ping only sometimes |
| Audio / MP3 playback | ✓ minimp3 + Intel HDA | ✗ No | ✗ No |
| Disk installer | ✓ MBR + FAT32 + kernel | ✗ No | ✗ No |
| Preemptive scheduler | ✓ PIT-driven, 32 tasks | ✗ No | ~ Cooperative sometimes |
| First-boot OOBE wizard | ✓ 7 steps | ✗ No | ✗ No |
| User accounts (uid/gid) | ✓ Unix permission model | ✗ No | ✗ No |
| libc dependency | ✓ None — freestanding | ~ Sometimes newlib | ~ Sometimes |
Common developer questions.
Design trade-offs, known limitations, and how things actually work under the hood.
What's coming next.
SynapseOS is actively developed. Priorities are ordered by impact and feasibility.
Fix Keyboard IRQ Routing
Complete PS/2 and USB HID interrupt delivery. Verify MADT APIC source overrides and PIC cascade wiring for consistent input on all configurations.
TLS Certificate Validation
Embed a minimal root CA store. Implement ASN.1 DER parsing and X.509 chain verification so HTTPS authenticates the server, not just encrypts the channel.
GPT Partition Support
Upgrade the disk installer from MBR to GUID Partition Table — required for disks > 2 TB and cleaner UEFI integration without a protective MBR.
Ring-3 User Space
Per-task page tables, a syscall dispatch gate, and an ELF loader to run user programs in ring 3 with hardware memory isolation from the kernel.
DHCP Client
Auto-configure IP, gateway, netmask, and DNS from the local network via DHCP DISCOVER/OFFER/REQUEST/ACK over UDP broadcast.
VirtIO Drivers
VirtIO block and network drivers for better QEMU performance — replacing emulated ATA/IDE and RTL8139 with the para-virtualized VirtIO transport.
Physical Page Allocator
Buddy system over the Limine memory map to replace the static 192 MB BSS heap with dynamic physical page allocation.
JavaScript Engine
A minimal JS interpreter in the browser — enough for basic DOM manipulation scripts without a full V8/SpiderMonkey port.
Wi-Fi Driver
Intel iwlwifi or Realtek rtw88 driver to enable wireless networking — currently only the Wi-Fi subsystem stub exists with no hardware backend.
Build and boot SynapseOS
today.
Full technical documentation, API references, developer guide, and administration manual — all generated from the actual source code.