// a programming language named after our closest stellar neighbor
Centauri is a compiled, capability-secure, actor-concurrent programming language built in Rust. Like its namesake — brilliant, close, and blisteringly fast — Centauri delivers production-grade performance from a vocabulary you can hold in your head.
4.37 light-years away, the Alpha Centauri system is a trinary dance of stellar immense power. Two sun-like stars locked in binary orbit, with a red dwarf trailing on the perimeter. Our language carries that same architecture — complex concurrency powered by raw, close-to-metal heat.
Centauri compiles your source to bytecode, runs it on a Rust-native VM, and gets out of the way. The surface is sleek enough to learn in an afternoon — capsules for objects, orbit for loops, explore/divert for errors.
Under the hood the VM runs a mark-sweep GC, an M:N actor scheduler, and a RASP security engine that intercepts every I/O call. Phase 7 introduces the Chamber Import System and OS-level multiprocessing via the proc module.
// Centauri v1.0 — capability-secure language · Phase 7 chamber "telemetry" system MissionControl { permit fs.read("/data/telemetry") permit net.transmit("https://api.nasa.gov") permit time.sleep("*") monitor(probe_id) { msg = receive transmit(msg) } start() { // Resolves from chamber t = telemetry.Sensor { temp: 5790, lum: 1.519 } transmit(t.report()) // Phase 6: log current UTC time launch_ts = time.now() transmit(time.format(launch_ts, "[%Y-%m-%d %H:%M:%S UTC] ignition")) spawn monitor("starshot-alpha") // Phase 6: measure I/O latency t0 = time.now() explore { data = fs.airlock("/data/telemetry/stellar.log") transmit(data) } divert(err) { transmit(err) } elapsed = time.diff(t0, time.now()) * 1000 transmit(elapsed) // ms elapsed // Phase 6: countdown with sleep n = 3 orbit (n > 0) { transmit(n) time.sleep(1) n = n - 1 } transmit("lightspeed!") } }
The pipeline is Lexer → Parser → Analyzer → Compiler → VM. The compiler emits a compact bytecode chunk with a constant pool. The VM executes with a stack machine — fast, simple, auditable.
The RASP engine normalizes every tainted string through an iterative URL-decode loop before running ~80 regex rules. Inputs needing more than 8 decode passes to stabilize are blocked outright — over-encoding is itself a signal of attack.
// Compilation & execution pipeline source.cnt │ ▼ Lexer // logos · zero-copy tokenization Token stream │ ▼ Parser // recursive descent · AST Program AST │ ▼ Analyzer // capability check · static security Verified AST │ ▼ Compiler // bytecode emit · constant pool Chunk { code[], constants[] } │ ▼ Scheduler // M:N actor runtime · PID registry │ ▼ VM // stack machine · GC · RASP engine │ ▼ Output + Security
Every I/O call requires a static permit before a single instruction runs. The analyzer rejects unpermitted access at compile time — not at runtime, not with exceptions.
compile-time80+ rules across SQL injection, XSS, command injection, SSRF, XXE, and WAF-bypass patterns. Tainted strings are normalized before scanning.
runtimespawn, send, receive. Each actor owns an isolated VM heap — no shared memory, no data races. M:N scheduler handles the load.
phase 5Object-oriented via capsules — single inheritance, super dispatch, first-class closures with mutable upvalue capture that persists across calls.
phase 2Heap objects (capsules, lists, closures) managed automatically. The GC threshold doubles after each collection cycle, amortising overhead.
automaticEvery string from file or network I/O is marked tainted. Taint propagates through operations. At every I/O boundary, tainted strings are re-scanned.
securitymatch supports numeric literals, strings, Vacuum, capsule type-check, binding variables, and wildcards. Arms short-circuit.
phase 3Centauri's error model: explore the risky path, divert when something is jettisoned. Full stack and locals unwinding.
phase 3centauri compile serialises bytecode + function tables, generates a standalone Rust project, and emits a fully native binary.
aotPhase 6 adds time.now(), time.format(), time.diff(), and more. Timestamps are Unix epoch Floats — pure std.
phase 6time.format(ts, fmt) supports 21 tokens for ISO, log-style, and millisecond-precision human-readable output.
Measure elapsed time with time.diff(a, b). time.sleep(secs) blocks an actor for a precise duration.
File-level module imports resolved safely at compile-time with idempotent diamond dependency handling.
phase 7Scale beyond cooperative actors with true OS threads, futures, and managed thread pools via proc.*.
Lock-free proc.atomic_* calls, mutexes, and thread barriers safely shared via handle IDs.
Three independent layers. None can be bypassed by the program being run.
The rule engine covers the OWASP Top 10 and beyond. Path rules fire before every filesystem call. Payload rules run on every string crossing an I/O boundary. Header rules protect every network send.
Every keyword in Centauri is themed to its legacy roots while the execution engine burns hotter.
Each actor is an isolated VM burning on its own thread. Messages are primitive values — no shared memory, no data races. The M:N scheduler distributes the immense workload across all CPU cores.
Six functions for everything temporal — current time, formatting, elapsed measurement, sleeping, and parsing. All UTC. All pure std. Timestamps are just Floats.
A production-grade leap. Modularize with compile-time chamber imports, and break the cooperative actor bounds with true OS-level multithreading and managed thread pools.
The chamber keyword resolves .cnt dependencies safely before runtime. It automatically manages diamond dependencies and namespaces imported functions by their file stem to prevent collisions.
chamber "math_ops" chamber "utils/crypto" system Main { launch() { hash = crypto.sha256("payload") val = math_ops.square(12) transmit(val) } }
While Phase 5 actors run cooperatively, the proc module exposes an 18-syscall suite for OS-level threads. Distribute CPU-heavy workloads across pools, parallel maps, and synchronize safely with lock-free atomics and mutexes.
system Main { launch() { // Initialize pool and hardware atomic pool = proc.thread_pool(4) counter = proc.atomic_new(0.0) // Submit work to thread pool f1 = proc.pool_submit(pool, "process", 1, counter) f2 = proc.pool_submit(pool, "process", 1, counter) // Await futures and shutdown proc.pool_await(f1) proc.pool_await(f2) proc.pool_shutdown(pool) transmit(proc.atomic_get(counter)) } }
Centauri v1.0 — Engineered by Blake Burns Technologies Inc.