rumpk/core
Markus Maiwald c01dd213b1 feat(rumpk): Implement PTY subsystem for terminal semantics
Phase 40: The Soul Bridge

IMPLEMENTED:
- PTY subsystem with master/slave fd pairs (100-107 / 200-207)
- Ring buffer-based bidirectional I/O (4KB each direction)
- Line discipline (CANON/RAW modes, echo support)
- Integration with FB terminal renderer

CHANGES:
- [NEW] core/pty.nim - Complete PTY implementation
- [MODIFY] kernel.nim - Wire PTY to syscalls, add pty_init() to boot

DATA FLOW:
Keyboard → ION chan_input → pty_push_input → master_to_slave buffer
→ pty_read_slave → mksh stdin → mksh stdout → pty_write_slave
→ term_putc/term_render → Framebuffer

VERIFICATION:
[PTY] Subsystem Initialized
[PTY] Allocated ID=0x0000000000000000
[PTY] Console PTY Allocated

REMAINING: /dev/tty device node for full TTY support

Co-authored-by: Forge <voxis@nexus-os.org>
2026-01-05 01:39:53 +01:00
..
fs Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
include feat(rumpk): Achieve interactive Mksh shell & formalize Sovereign FSH 2026-01-05 01:14:24 +01:00
ion Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
loader Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
README.md feat(rumpk): Phase 2 Complete - The Entropy Purge & Sovereign Alignment 2025-12-31 20:18:48 +01:00
channel.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
cstubs.c feat(rumpk): Phase 3.5b Zicroui HUD Integration 2025-12-31 20:18:49 +01:00
fiber.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
invariant.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
ion.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
kernel.nim feat(rumpk): Implement PTY subsystem for terminal semantics 2026-01-05 01:39:53 +01:00
loader.nim feat(rumpk): Achieve interactive Mksh shell & formalize Sovereign FSH 2026-01-05 01:14:24 +01:00
loader.zig feat(rumpk): Sovereign Core Stabilization & Membrane IPC Hardening 2025-12-31 20:18:49 +01:00
netswitch.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
overrides.c feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
panicoverride.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
pty.nim feat(rumpk): Implement PTY subsystem for terminal semantics 2026-01-05 01:39:53 +01:00
re-symbol.txt feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
ring.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
sched.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
watchdog.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
write_wrapper.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00

README.md

Rumpk Core (L1)

Language: Nim
Purpose: Architecture-agnostic kernel logic

Module Index

File Purpose
kernel.nim Main Orchestrator (kmain)
ion.nim ION Control Plane & Channel API
fiber.nim Cooperative fiber abstraction
watchdog.nim Autonomous Immune System (Healer)
ring.nim Lock-free Sovereign ring buffers
panicoverride.nim Freestanding panic handler

Architecture Independence

This folder contains no architecture-specific code. All platform-specific details are handled by the HAL layer (../hal/).

Compile-time architecture selection uses Nim's when defined():

when defined(amd64):
  const CONTEXT_SIZE = 56
elif defined(arm64):
  const CONTEXT_SIZE = 96
elif defined(riscv64):
  const CONTEXT_SIZE = 112

Dependencies

  • Imports console_write, rumpk_halt from HAL (Zig L0)
  • Imports cpu_switch_to from arch-specific assembly
  • Uses mm:arc memory management (no GC)

Build

Built via ../build.sh [aarch64|x86_64|riscv64]