MatchBox
MatchBox is a Rust implementation of the BoxLang runtime. BoxLang compiles to bytecode, and a Rust VM runs it, so core and native builds need no JVM.
Get Started
Install the MatchBox Version Manager (MVM), then install MatchBox:
curl -fsSL https://raw.githubusercontent.com/ortus-boxlang/matchbox-quick-installer/main/install/install.sh | bash
mvm install latest
mvm use latest
matchbox --versionOn Windows, use the install.ps1 script from the matchbox-quick-installer repository. See the MatchBox page for a full introduction.
How It Works
MatchBox is a complete, self-contained language toolchain:
Parser: a Pest PEG grammar reads
.bxssource files and produces an AST.Compiler: a multi-stage compiler lowers the AST into a compact bytecode format.
VM: a stack-based bytecode virtual machine runs the bytecode, with a tiered Cranelift JIT in the native CLI and a cooperative fiber scheduler for async work.
Targets: the same bytecode can be embedded in a native binary, run in the browser or a WASI host, run on ESP32 devices, or executed directly by the MatchBox runner.
MatchBox and BoxLang on the JVM
MatchBox complements the JVM runtime and does not replace it. It is an independent implementation of an evolving subset of BoxLang, so runtime APIs and module support differ. Read Differences From BoxLang JVM and check compatibility for your target.
Runtime
JVM
Rust bytecode VM
Java ecosystem and interop
Full
Experimental in native builds, needs a JDK
Single-file executable
No
Yes
Browser, WASI and ESP32
No
Yes
What You Can Build
CLI tools: compile to a single native binary and distribute without any installer.
Serverless functions: small cold starts on AWS Lambda (preview).
Browser applications: run BoxLang logic in the browser through WebAssembly and JavaScript.
Native Fusion apps: mix BoxLang with hand-written Rust.
Last updated
Was this helpful?
