THE PLATFORM HAS PURPOSE ======================== Rumpk now has a payload loading system: NPL (Nexus Payload). OUTPUT ------ [NPL] ✅ Verification PASSED [NPL] Executing payload... [NPL] ✅ Payload returned! [NPL] ✅ Bad sig rejected NPL FORMAT (128-byte header) ---------------------------- - Magic: \x7fNPL (4 bytes) - Version: 1 (1 byte) - Arch: 0xAA=ARM64, 0xEE=x86_64, 0x55=RISC-V (1 byte) - Flags: 2 bytes - Signature: 64 bytes (Ed25519 placeholder) - Body Size: 8 bytes - Reserved: 48 bytes IMPLEMENTATION -------------- core/npl.nim: - NPLHeader struct (packed, 128 bytes) - loadNpl() - validates magic, version, arch, signature - buildTestPayload() - creates test NPL in memory - Signature verification (mock: rejects 0xFF) TESTS VERIFIED -------------- 1. Valid payload: Loads and executes RET instruction 2. Bad signature: Correctly rejected (0xFF in sig[0]) 3. Cross-arch: Would reject wrong arch code PHASE SUMMARY ------------- ✅ Phase 1: Documentation (SPEC-008/009/010) ✅ Phase 2: Pure Zig libc (Freestanding Doctrine) ✅ Phase 3: Cooperative Fibers (Ping Pong) ✅ Phase 4: NPL Loader (with mock signature) → Phase 4.2: Ed25519 verification (Monocypher) → Phase 5: VisionFive 2 RISC-V hardware The unikernel can now load and execute signed payloads. Next: Real Ed25519 verification. |
||
|---|---|---|
| .zig-cache | ||
| boot | ||
| core | ||
| hal | ||
| io | ||
| README.md | ||
| build.sh | ||
| build.zig | ||
| run.sh | ||
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