Caribou caribou
polyglot runtime substrate

Many languages.
One runtime core.

A polyglot substrate that runs multiple languages on a shared heap, scheduler and module registry — so languages share modules, types and object instances across boundaries without killing performance. Built for game and multimedia engines, plugin extensions, and actor/agent systems.

Get started → View source
MIT licensed·zero guest-side dependencies·hot-reloadable scripts
~/projects/game — caribou
$ caribou build bin/game.hl
  ash      · haxe → hashlink bytecode   ok
  wrenlift · 12 wren modules            ok
  zyntax   · 3 .zyn, 1 python frontend  ok
  plugins  · libphysics.so              ok
  → bin/game.cb

$ caribou run --report bin/game.cb
  one heap · one scheduler · one registry
1
process, heap and scheduler
0
compile-time deps in guests
100%
Haxe conformance via Ash
Built for

Game & multimedia engines

A Haxe host owns the loop and the shipped binary; gameplay, UI and tools are scripted in whatever language suits them and hot-reload in place.

Built for

Plugin extensions

Third-party extensions ship as scripts or native C libraries, resolved through one registry and sandboxed by the same scheduler as everything else.

Built for

Actor & agent systems

Thousands of cooperative fibers across languages sit in one scheduler and one heap — actors message each other by reference, not by wire format.

Interop

Imports that cross languages.

A game engine written in Haxe can drive gameplay systems scripted in Wren, hand native objects across the boundary, and hot-reload scripts at runtime — without rebuilding native components.

hud.wrenwren → haxe
import "game:Player" for Playerclass Hud {  // signature inferred  static draw(p) {    System.print("hp %(p.health)")  }  // or state it explicitly  #export = "scale(n: Num) -> Num"  static scale(n) { return n * 2 }}
Main.hxhaxe → wren
// haxe -lib caribouimport game.hud.Hud; // src/game/hud.wrenclass Main {  static function main() {    Hud.draw(new Player());    // typed by the #export signature    var hp:Float = Hud.scale(21);  }}
plugins/math/src/lib.rsnative plugin
caribou_abi::plugin! {    name: "math";    fn hypot(f64, f64) -> f64;    fn shout(Text) -> Text;    class Vec2 {        fn new(f64, f64) -> Box<Vec2>;        fn len(&Vec2) -> f64;        fn scale(&mut Vec2, f64);    }    class Tally {        fn watch(&mut Tally, Value);        fn add(&mut Tally, f64) -> f64;    }}
UsePlugin.hxhaxe → plugin
import math.Math;import math.Vec2;import math.Tally;Sys.println(Math.hypot(3, 4));var v = new Vec2(3, 4);v.scale(2);Sys.println(v.len());// the plugin object holds a Haxe closurevar t = new Tally();t.watch(total -> total * 10);Sys.println(t.add(3));

A C or Rust library declared with caribou_abi::plugin! and dropped in plugins/ becomes a module like any other: its classes appear under math.* in Haxe, import the same way in Wren, and can hold a guest closure and call back into it.

Explicit or inferred exports

Annotate a Wren signature with #export = "add(n: Num) -> Num", or let Caribou infer it.

No marshalling tax

Native objects pass across boundaries by reference — the heap is already shared.

Hot reload in prod

Guest scripts reload while the process runs, in development and shipped builds alike.

Guest runtimes

Languages keep their ecosystem.

Haxe still pulls from haxelib, Wren from Hatch, Python from pip, Lua from luarocks. Nothing is re-packaged for Caribou, and the set is open — a frontend joins by filling in a seam table.

Ash

HAXE

Haxe compiled to HashLink bytecode, run on a tiering JIT. Usually the host: it owns the process entry point, the main loop and the shipped executable.

ash.rayzor.tech ↗

WrenLift

WREN

Standalone Wren with a tier-up JIT and the Hatch package tool. On Caribou it matches its own benchmark timings and memory under heavy GC pressure.

wrenlift.com ↗

Zyntax

LUA · PYTHON · DSL

The frontend lane. Zyntax is a complete JIT compiler frontend for further languages and DSLs — Python and Lua come from it — and its modules register beside Wren and Haxe in the same namespace.

in progress zyntax.org ↗

Native plugins

C ABI

C libraries built with caribou_abi::plugin! drop into plugins/ and are treated as first-class languages in the registry.

The core

Four runtime systems, consolidated.

01

Global managed heap

One collector for every language. Objects cross boundaries as references, never as serialized copies.

02

Task & fiber scheduler

Cooperative scheduling shared across guests, so a Wren fiber and a Haxe task sit in the same queue.

03

Module registry

One namespace across languages. A module's functions belong to the module, whoever imports it.

04

Native plugin loader

A single dynamic loader for native plugins, resolved through the same registry as script modules.

The seam table

Each guest exposes a struct of function pointers covering heap allocation, collection and scheduling. By default they point at its own implementations.

Adapter initialization

Adapter crates overwrite those tables with Caribou's implementations before the runtime allocates a single byte.

Isolated testing

Standalone suites still run against native implementations, unmodified. Adapter builds run the same guest binaries over Caribou.

Get started

Simple toolchain in one CLI.

One install script gives you the caribou command — pulled from the rolling nightly release, verified, and dropped on your PATH. Prefer to build it yourself? See building.md.

01

Install caribou

One script drops the caribou binary on your PATH. Prebuilt for macOS, Linux and Windows, aarch64 and x86_64.

# macos · linux
$ curl -fsSL caribou.rayzor.tech/install.sh | sh

# windows · powershell
> irm caribou.rayzor.tech/install.ps1 | iex
02

Run a program

Point caribou at the program your compiler already produces. Guest modules beside it are discovered and loaded.

caribou run bin/game.hl
caribou run --report bin/game.hl
caribou run --mode hybrid --wren tiered bin/game.hl
03

Bundle for deployment

build packages the program and every language's modules — plus native plugins — into one .cb file. A run needs the file and nothing else.

caribou build bin/game.hl
caribou build bin/game.hl -o dist/game.cb
caribou run dist/game.cb
04

Inspect the registry

describe reports what a module, plugin library or project root exports across the shared namespace.

caribou describe src/game/hud.wren
caribou describe plugins/libphysics.so
caribou describe .
Docs in the repo: interop.md architecture.md building.md