Stable Branch Handoff
HANDOFF.md — microkernel_0.1_stable
Date: April 18, 2026 · Phase: 17.5 → 18
The "Black Screen of Life" is solved. Higher-Half kernel boots in QEMU. Pure in-kernel Rust driver renders full-screen 32-bit ARGB blue gradient to Limine Framebuffer. Tuxedo tranny tool purged and replaced by pure Rust tooling.
AI Workflow & Token Optimization Rules
- Search Boundaries: NEVER run unconstrained
find. Restrict all file ops to the microkernel directory. - Compression Modes:
/caveman ultrafor telegraphic output./caveman wenyanfor maximum compression. - Driver Forge Pipeline: Use
c2rustcombined withsex-driver-forgeagent for legacy C porting.
Architectural Context
- Architecture: x86_64 Higher-Half Microkernel (
0xffffffff80000000), SASOS. - Isolation: 100% Lock-free, hardware-enforced via Intel PKU/MPK.
- Build Stack: Rust Nightly (
build-std=core,alloc), customx86_64-sex.json, Dockersexos-builder:v28. - Host: M1 Mac using
qemu-system-x86_64 -machine q35 -cpu max,+pku.
Phase 28a: The Zero-Copy GUI Handoff
Userland graphics stack deferred until "ship orbital compositor" command. Execution sequence:
- PDX Message: Kernel packages framebuffer metadata into lock-free
MessageType::DisplayPrimaryFramebuffer. - Hardware-Enforced Handover: Kernel revokes own write access, uses Intel PKU (
pkey_set) to grant exclusive zero-copy access tosexdisplayPD.
Roadmap: COSMIC Compositor Integration
- Backend (Orbital/Orbclient): sexdisplay initializes
orbitalwindowing system on raw memory pointer. - Frontend (Cosmic Compositor): Cosmic desktop ecosystem adapted to interface with
orbclient.
macOS M1/M2 Build Commandments
- Rule 1 — Bootstrap Bypass:
RUSTC_BOOTSTRAP=1required to force-Z build-std. - Rule 2 — Linker Override: Install
lldvia Homebrew and injectRUSTFLAGS="-C linker=lld".
export RUSTFLAGS="-C linker=lld"
RUSTC_BOOTSTRAP=1 cargo build --target x86_64-sex.json -Z build-std=core,alloc -p sex-kernel --release
Phase Roadmap
| Phase | Milestone | Mechanism | Status |
|---|---|---|---|
| 18.6 | Serial Debugging | UART 0x3F8 | Complete |
| 18.7 | Hardware Isolation | Intel PKU (MPK) | Complete |
| 19.5 | Framebuffer Claim | Midnight Blue + PDX prep | Complete |
| 20.0 | Zero-Copy Handover | sexdisplay ELF + PKU grant | In Progress |
| 21.0 | Windowing | Orbital (SAS Surfaces) | Queued |
| 22.0 | Desktop Environment | COSMIC (Smithay Port) | Roadmap |