54 lines
1.7 KiB
Markdown
54 lines
1.7 KiB
Markdown
# 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
|
|
|
|
- [SPEC-008: Architecture](/.agents/specs/SPEC-008-RUMPK-ARCHITECTURE.md)
|
|
- [SPEC-009: I/O Subsystem](/.agents/specs/SPEC-009-RUMPK-IO.md)
|
|
- [SPEC-010: Sovereign Hierarchy](/.agents/specs/SPEC-010-SOVEREIGN-HIERARCHY-V2.md)
|
|
|
|
## Build (Coming Soon)
|
|
|
|
```bash
|
|
cd core/rumpk
|
|
zig build # Build L0 HAL
|
|
nimble build # Build L1 Logic
|
|
```
|