Skip to content

dancinlab/hexa-os

Repository files navigation

DOI License: MIT Stage Target p99 Depends

🧊 HEXA-OS β€” AI Inference Appliance OS

Not a Linux replacement. law-enforced Β· self-hosting Β· unikernel-first. Serving p99 30–50% ↓ is the whole point.

user .hexa
  β†’ hexa_compile β†’ bytecode
  β†’ hexa_vm_run (user proc, single address space)
  β†’ syscall = hexa fn call   (not int 0x80,  ~300 ns β†’ 20–80 ns)
  β†’ kernel fn: law_check(caller_cap, target, op)
      pass β†’ real I/O
      fail β†’ EPERM + growth_bus record

Training gains are capped at ~5% (compute-bound) β€” serving only. Scoped as a cloud inference appliance. v0.1 target: 7B-model unikernel serving, cold-start < 500 ms.

YouTube Β· Email Β· β˜• Ko-fi Β· πŸ’– Sponsor Β· πŸ’³ PayPal Β· πŸ—ΊοΈ Atlas Β· πŸ“„ Papers

πŸ”­ NEXUS β€” Universal Discovery Engine. 216 lenses + OUROBOROS evolution + 5-phase singularity cycle.

🧠 Anima β€” Consciousness implementation. PureField repulsion-field engine + 1030 laws + Ξ¦ ratchet.

πŸ—οΈ N6 Architecture β€” Architecture from perfect number 6. 225 AI techniques + chip design + crypto/OS/display.

πŸ’Ž HEXA-LANG β€” The Perfect Number Programming Language. Working compiler + REPL.

πŸ“„ Papers β€” Complete paper collection (92 papers, Zenodo DOIs).


Highlights

🎯 Scoped β€” cloud inference appliance only. Not a Linux replacement
⚑ No syscalls β€” ~300 ns β†’ fn call 20–80 ns (5–20Γ—)
🧊 Unikernel-first β€” Firecracker guest Β· virtio-only drivers Β· single address space
βš–οΈ Law kernel β€” law_check(cap, target, op) + growth_bus log. raw.json is the capability source
πŸ“ˆ v0.1 target β€” 7B serving Β· cold-start < 500 ms Β· p99 30–50% ↓
🧬 Self-hosting β€” boots 100% in .hexa Β· freestanding, no libc

Why Hexa OS

Bottleneck Linux Hexa OS Gain
syscall round-trip ~300 ns fn call 20–80 ns 5–20Γ—
copy_to_user memcpy pointer pass bandwidth 1.5–2Γ—
context switch 1–3 ΞΌs cooperative yield 100–300 ns 10Γ—
latency p99 ~200 ms 30–50% ↓ real commercial value
QPS at SLA baseline 20–40% ↑ downstream effect

Training is compute-bound, so OS-layer gains cap at ~5%. Serving is dominated by syscall Β· copy Β· context-switch, so OS-layer wins land directly on p99.

Flagship combo β€” hexa-serve v0.1

Unikernel + Virtio-only + Firecracker guest
  Γ— Tensor primitive + KV-cache inode + Serving loop
  Γ— Single address space + Zero-copy
  Γ— Law kernel (raw.json)

Layout (planned)

self/os/
  boot.hexa                  UEFI stub + kernel load
  kernel.hexa                scheduler / memory / IPC
  fs.hexa                    law-tagged inode
  drv/                       virtio-only drivers
  user.hexa                  user-space runtime
  _freestanding_probe.hexa   libc-less POC (first step)

docs/
  ROADMAP.md                 3 stages Γ— prerequisites
  BRAINSTORM.md              124 raw items
  perf_model.md              p99 gain mechanism

Entry path

  1. Freestanding hexa compile POC β€” @nostd ELF, no libc
  2. Syscall-free bench POC β€” measure p99 on a user-space mini-server
  3. Unikernel v0.1 β€” Firecracker guest + 7B serving

Prerequisites

  • hexa-lang P7–9 fixpoint (C runtime eliminated) β€” roadmap
  • Freestanding codegen + @nostd support

Links

ROADMAP Β· Docs Β· Releases Β· Paper (hexa-lang Β· P-HEXA)


🧊 syscalls become fn calls. p99 becomes commercial value. · need-singularity

About

πŸ–₯️ hexa-os β€” AI μΆ”λ‘  μ–΄ν”ŒλΌμ΄μ–ΈμŠ€ OS (unikernel + law-enforced + hexa self-host).

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors