The Rust runtime for BoxLang

BoxLang, compiled to Rust.
Ships to a native binary.

BoxLang is the platform, and MatchBox is its Rust runtime, alongside the JVM one. Same language, with a bytecode VM and a tiered Cranelift JIT, for native, browser, WASI, AWS Lambda and ESP32.

$ curl -fsSL https://raw.githubusercontent.com/ortus-boxlang/matchbox-quick-installer/main/install/install.sh | bash
5 deployment targets4 JIT tiers500+ transferred compat tests~4.8 MB hello world binary
hello.bxs

      
runner stub + your bytecode
Try it live

MatchBox, running in this tab.

No install and no server. This is a real MatchBox VM compiled to WebAssembly. Click an example or type your own BoxLang.

Pick an example, or type an expression below.
The runtime loads when you scroll here.Open the full playground →
One platform, two runtimes

BoxLang on the JVM. BoxLang on Rust.

MatchBox does not replace the JVM runtime. It complements it. Write BoxLang once, then choose the runtime that fits where the code has to run.

BoxLangthe language, conventions and tools
RUNTIME A

BoxLang on the JVM

The full Java ecosystem, broad module coverage, and the infrastructure your JVM apps already use.

Choose it for Java interop and the full library surface
RUNTIME B

MatchBox, on Rust

Single binaries, browser and edge, containers, serverless and microcontrollers, with no JVM at runtime.

Choose it to run BoxLang where a JVM does not fit
0deployment targetsnative · browser · WASI · Lambda · ESP32
0JIT tiersloops, arrays, hot functions
0transferred compat testsblack-box, from the BoxLang JVM suite
0 JVMsneeded at runtimecore runtime, native builds

MatchBox is an independent, evolving implementation. Runtime APIs and module support differ between the two, so check compatibility for your target.

AI native

Agents already speak MatchBox.

MatchBox is part of the BoxLang productivity platform, where developers and AI agents work in the same loop. Install the skills once and your agent knows the targets, the commands and the limits.

your coding agent
$ npx skills add ortus-boxlang/skills
0BoxLang skills in the registry
llms.txtand an MCP index on this site
Inside MatchBox

From source to machine code.

Your BoxLang compiles to bytecode. A Rust VM runs it, schedules fibers, and the native CLI compiles hot code with Cranelift.

    Speed

    It watches your code, then compiles what is hot.

    Four tiers of JIT, built on Cranelift. Cheap profiling first, native machine code only once a loop or function has earned it.

    Tier in action ILLUSTRATIVE
    
          
    interpreter
    0 ms
    JIT
    0 ms
    Concurrency

    Fibers share one thread, politely.

    runAsync, sleep and HTTP yield to a cooperative scheduler, so other fibers keep running while one waits.

    main
    runAsync A
    runAsync B
    one thread
    How it ships

    A tiny runtime, plus your code. One file.

    MatchBox compiles your BoxLang to bytecode and appends it to a stripped runner stub. Nothing else to install on the destination.

    Runner stubVM core, ~4.7 MB
    Your bytecodefrom app.bxs
    ./appone self-contained file
    Nothing to installThe destination needs no JVM and no separate MatchBox install for a native build.
    Compile onceShip a .bxb bytecode file to any compatible runner, or strip the source text with --strip-source.
    Fibers built inA cooperative scheduler runs runAsync and non-blocking sleep and HTTP without OS thread overhead.
    Written in RustA memory safe implementation, with a tiered JIT where the target allows it.
    Targets

    Run it close to the workload.

    One codebase. Pick the destination at build time.

    Know before you go

    What each target brings with it.

    Targets share the language, not every capability. Here is the honest picture, straight from the compatibility guide.

    Native
    Browser / WASM
    ESP32

    A high level orientation, not a guarantee for every release or build. Test the artifact on the destination.

    Native Fusion

    BoxLang, Rust and Java, in one loop.

    Call Rust from BoxLang. Let Rust call back into BoxLang. Reach Java classes from a native build. Tap an arrow to see it.

    Rustnative/*.rs BoxLangapp.bxs Javavia JNI add(10, 20) callback(n) java.new(...)
    Consulting and support

    Need MatchBox in production? Talk to the people who build BoxLang.

    Ortus Solutions offers professional support, architecture reviews and custom development for BoxLang, including native tools, edge and WASM workloads, and embedded devices.

    Priority supportAnswers from the team that wrote the runtime.
    Custom developmentNative Fusion modules, edge workloads and device firmware built to your brief.
    Training and reviewGet your team productive and your design checked.
    Start in a minute

    Install it. Run a script. Ship a binary.

    Three steps. MVM, the MatchBox Version Manager, installs MatchBox for you and keeps versions side by side.

    1. Install MVM

      Run the installer for your system, then open a new terminal.

      Linux and macOS
      $ curl -fsSL https://raw.githubusercontent.com/ortus-boxlang/matchbox-quick-installer/main/install/install.sh | bash
      Windows PowerShell
      > irm https://raw.githubusercontent.com/ortus-boxlang/matchbox-quick-installer/main/install/install.ps1 | iex
    2. Install MatchBox

      Install the latest stable release and switch to it. If matchbox is not found, run mvm doctor.

      $ mvm install latest && mvm use latest
      $ matchbox --version
    3. Run your first script

      Save println( "Hello, MatchBox!" ); in a file called hello.bxs, run it, then build it into a single native executable.

      $ matchbox hello.bxs
      $ matchbox --target native hello.bxs

    Not ready to install? Try MatchBox in your browser or take the course. Review an installer before you run it if you prefer: both scripts are in the MVM repository.

    Questions

    Straight answers.

    What is MatchBox?

    MatchBox is a Rust implementation of the BoxLang runtime. BoxLang is the platform, and it now has two runtimes: the JVM runtime and MatchBox on Rust. MatchBox compiles BoxLang to bytecode and runs it on a Rust VM with a tiered JIT in the native CLI.

    Is MatchBox a replacement for BoxLang on the JVM?

    No. It complements it. Use the JVM runtime for the full Java ecosystem and broad module coverage. Use MatchBox to run BoxLang where a JVM does not fit, such as single binaries, the browser, WASI containers, serverless and microcontrollers. Runtime APIs and module support differ, so check compatibility for your target.

    Does MatchBox need a JVM?

    No, not for the core runtime or for native builds. Experimental Java interop exists in native builds and needs a JDK on the machine.

    Where can MatchBox run?

    Native executables, the browser and JavaScript (including Cloudflare Workers), WASI containers, AWS Lambda (preview) and ESP32 devices.

    How do I install it?

    Install MVM, the MatchBox Version Manager, then run mvm install latest && mvm use latest. See the installation guide.

    Can AI agents write MatchBox code?

    Yes. Install the BoxLang skills with npx skills add ortus-boxlang/skills and your agent learns the targets, commands and limits. This site also publishes an llms.txt index and an MCP endpoint.