Skip to content

dancinlab/hexa-os

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexa-os

🖥️ hexa-os

HEXA-OS Family — AI inference appliance OS · law-enforced · self-hosting · unikernel-first

License CI Spec Modules Verify Closure DOI Family

Operating systems · unikernel · Firecracker · law kernel · syscall-free · p99-first · self-hosting · serving-only


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 · 💖 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.

🏗️ CANON — Architecture from perfect number 6. 225 AI techniques + chip design + crypto/OS/display.

💎 HEXA-LANG — The Perfect Number Programming Language. Working compiler + REPL.


Status

  • v0.1 spec live (design stage) — 6 modules, SPEC_FIRST closure, 4/4 verify scripts PASS
  • 6 modules: boot · kernel · serving · deployment · ios · macos
  • Family substrate: this repo + sibling hexa-ios/ + hexa-macos/ placeholders
  • Depends on hexa-lang P7–9 fixpoint (C runtime eliminated, @nostd freestanding codegen)
  • Operational unikernel UNVERIFIED — design target, not a measurement; ~5% training cap is the falsifiable real-limit claim
  • DOI 10.5281/zenodo.19703255 (concept release)

Install

# 1. Install hexa-lang (gives you `hexa` + `hx` package manager)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/dancinlab/hexa-lang/main/install.sh)"

# 2. Install hexa-os
hx install hexa-os

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 kernellaw_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)

Run

# closure verification (the SPEC_FIRST entry point)
hexa run verify/run_all.hexa            # → 4/4 scripts passed

# individual verify scripts
hexa run verify/spec_presence.hexa       # 6/6 module spec docs at declared paths
hexa run verify/lattice_arithmetic.hexa  # n=6 lattice identities (aux check)
hexa run verify/real_limits_anchor.hexa  # H1/H5/H6/H7/H9/S1 real-limit anchors
hexa run verify/closure_consistency.hexa # scoreboard cross-check

# inspect spec docs
ls docs/                                  # PERF_P99 · HEXA_SERVE_V01 · DEPLOYMENT · BRAINSTORM
cat hexa-ios/hexa-ios.md                  # mobile target spec
cat hexa-macos/hexa-macos.md              # desktop target spec

Operational boot / kernel / serving invocations are pre-impl (gated on hexa-lang P7–9 fixpoint).

Repo layout

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

Verify

hexa-os is a SPEC_FIRST substrate: 6 design modules, each backed by a spec doc on disk. Closure is verified by 4 small .hexa scripts under verify/:

# from repo root:
hexa run verify/run_all.hexa
# expected: 4/4 scripts passed
# script what it checks
1 verify/spec_presence.hexa 6/6 module spec docs at declared paths (+ 2 crosslink sub-specs)
2 verify/lattice_arithmetic.hexa n=6 lattice identities (aux per LATTICE_POLICY.md §1.3 rule 1 — never sole verification)
3 verify/real_limits_anchor.hexa LIMIT_BREAKTHROUGH.md anchors (Turing H1 · Brewer H6 · Lamport H7 · NVMe H5 · speed of light H9 · Linux syscall S1 baseline)
4 verify/closure_consistency.hexa scoreboard cross-check (CLI registry · hexa.toml · README badge · AGENTS.md policy registration)

The 6 modules:

# module spec doc
1 boot ROADMAP.md — UEFI / Multiboot2 / Firecracker guest
2 kernel docs/PERF_P99.md — scheduler · memory · IPC · law_check
3 serving docs/HEXA_SERVE_V01.md — hexa-serve v0.1 (7B unikernel)
4 deployment docs/DEPLOYMENT.md — operational notes
5 ios hexa-ios/hexa-ios.md — mobile target spec
6 macos hexa-macos/hexa-macos.md — desktop target spec

UNVERIFIED until the operational unikernel boots (gated on hexa-lang P7–9 fixpoint). It is a design target, not a measurement. The ~5% training cap is a falsifiable real-limit claim (GPU-FLOPs-dominated); it is preserved verbatim from the headline above. Actual OS vendors (Linux Foundation, Microsoft, Apple, Google) use their own benchmarks (LMBench / sysbench / fio / etc.) — no lattice-fit is asserted on any external system.

Links

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

License

MIT — permissive open source.


🖥️ syscalls become fn calls. p99 becomes commercial value. · dancinlab

About

🖥️ hexa-os — AI 추론 어플라이언스 OS (unikernel + law-enforced + hexa self-host).

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors