STRATEGIC PIVOT: From Project to Doctrine
==========================================
This commit initializes Rumpk - a ground-zero Zig+Nim unikernel with
POSIX-hostile design, hard ABI barriers, and military-grade security.
DOCUMENTATION (3 New Specs)
---------------------------
• SPEC-008-RUMPK-ARCHITECTURE.md
- L0 (Zig): Boot, PMM, IRQ, HAL
- L1 (Nim): LWKT Scheduler, Fibers, Disruptor Ring
- L2 (ABI): struct HAL function pointers (future Janus socket)
- L3 (Payload): NPL/NPK loaders, optional POSIX shim
- SipHash IDs + Ed25519 signed execution
• SPEC-009-RUMPK-IO.md
- Disruptor Ring: Lock-free O(1) inter-fiber communication
- Adaptive Governor: War Mode (polling) ↔ Peace Mode (interrupts)
- Zero VM-exit design (Rumkv does NOT touch packets)
• SPEC-010-SOVEREIGN-HIERARCHY-V2.md
- /Cas: Immutable Content-Addressable Storage
- /Cell: Active Containers (Driver/, App/, Sensor/)
- /Bus: Active Interfaces (replaces /dev)
- /Data: Mutable Persistence (User/, Volume/)
- 'The Unix Lie' compatibility layer for legacy apps
VISION.MD UPDATE
----------------
• Added dedicated Rumpk section differentiating from Rumk
• Documented 4-layer architecture with ASCII diagram
• Listed key innovations: Adaptive I/O, Disruptor, SipHash, Ed25519
REPOSITORY STRUCTURE (core/rumpk/)
----------------------------------
core/rumpk/
├── boot/header.zig # Multiboot2/EFI entry
├── hal/abi.zig # L0→L1 ABI contract (struct HAL)
├── core/kernel.nim # kmain() entry point
├── core/ring.nim # Disruptor ring buffer
├── io/governor.nim # Adaptive War/Peace I/O
├── build.zig # Zig build orchestration
└── README.md # Feature index
DESIGN DECISIONS
----------------
• Hard ABI barrier: Zig exports C-compatible struct to Nim
• Language-agnostic: L1 can be swapped for Janus later
• No shared state: Fibers communicate via Channels only
• No JIT, No W^X violations: Code sections immutable
NEXT STEPS
----------
• Phase 1: Boot on QEMU (print 'Hello Rumpk')
• Phase 2: Nim runtime on bare metal
• Phase 3: Two fibers switching (Ping/Pong)
• Phase 4: NPL loading with signature verification
• Phase 5: VisionFive 2 hardware validation
This is the foundation for the 'OS Factory' vision.
Rumpk + Rumkv + NPL = Independent from Unix/Linux.
Tested: Directory structure validated
Status: ✅ SCAFFOLD COMPLETE
|
||
|---|---|---|
| .zig-cache | ||
| boot | ||
| core | ||
| hal | ||
| io | ||
| README.md | ||
| build.zig | ||
README.md
Rumpk: The Modular Unikernel
"The Kernel is a Library. The App is the OS."
Status: EXPERIMENTAL
Languages: Zig (L0) + Nim (L1)
Design: POSIX-hostile, Military-grade
Directory Structure
rumpk/
├── boot/ [L0] Entry & Architecture (Zig/Asm)
│ ├── start.S Multiboot2/EFI entry point
│ └── arch/ Architecture-specific code
├── hal/ [L0] Hardware Abstraction (Zig)
│ ├── mm.zig Physical/Virtual Memory
│ ├── irq.zig Interrupt handling
│ ├── serial.zig UART/Early logging
│ └── abi.zig C-ABI export to Nim
├── core/ [L1] Logic (Nim)
│ ├── kernel.nim kmain() entry
│ ├── sched.nim LWKT Scheduler
│ ├── fiber.nim Fiber/Context management
│ └── ring.nim Disruptor buffer
├── sys/ [L2] ABI Glue
│ └── syscall.zig System call handlers
├── payload/ [L3] NPL/NPK Loaders
│ └── loader.nim Signature verification
└── io/ I/O Subsystem
└── governor.nim Adaptive War/Peace mode
Key Features
- Adaptive I/O: War Mode (polling) ↔ Peace Mode (interrupts)
- Disruptor Ring: Lock-free inter-fiber communication
- SipHash IDs: Collision-resistant process identification
- Ed25519: Only signed code executes
Specifications
Build (Coming Soon)
cd core/rumpk
zig build # Build L0 HAL
nimble build # Build L1 Logic