TL;DR
- RunMat is a modern, open-source runtime that executes MATLAB code fast.
- We implement the full language grammar and the core semantics (arrays, indexing, control flow, functions, cells/structs, OOP).
- The core stays small and fast; everything else grows via a package system (native Rust or source MATLAB).
- Core built-ins are canonical (e.g.,
sin,cos,sum, andprintf-style formatting likefprintf/sprintf) and match the expected, documented behavior. When semantics are domain-specific or ambiguous, they live in packages. - Built in Rust, with tiered execution (interpreter first, JIT for hot code) and a generational GC tuned for numerics.
- Benchmarks show 150x–180x speedups vs GNU Octave on representative workloads; see Performance below.
- New to MATLAB? Start with our primer: What is MATLAB? The Language, The Runtime, and RunMat.
Why another runtime?
If you've written MATLAB code, you know the trade-offs:
- MATLAB is powerful but proprietary and heavy to start; deployment is license-bound.
- GNU Octave is free and compatible with lots of code, but startup and hot-path performance can be limiting.
- Moving to a new language means rewriting and - perhaps most importantly - retraining.
RunMat aims for a fourth path: keep the MATLAB language you know, but put it on a modern engine with a smaller core, clean semantics, and open extensibility. If you want a short background explainer, see this guide.
Language compatibility at a glance
A quick view of core language semantics. Full details: here.
| Feature Category | RunMat | Octave |
|---|---|---|
| Grammar & parser (full MATLAB surface) | ✅ | ✅ |
Arrays & indexing (end, colon, logical masks, N-D slicing) | ✅ | ✅ |
Multiple returns, varargin/varargout, nargin/nargout | ✅ | ✅ |
OOP classdef (props/methods), operator overloading | ✅ | ❌ |
Events/handles (addlistener, notify, isvalid, delete) | ✅ | ❌ |
Imports precedence & static access (Class.*) | ✅ | ❌ |
Metaclass operator ?Class | ✅ | ❌ |
| String arrays (double-quoted) | ✅ | ❌ |
Standardized MException identifiers | ✅ | ❌ |
If something you rely on is not in the core, packages are the intended extension point.
What RunMat is (and is not)
What it is:
- A new runtime that accepts MATLAB syntax and executes the core semantics quickly.
- A slim, production-oriented engine written in Rust with a stable Value/Type/ABI.
- A system that grows through packages: built-ins implemented in Rust or MATLAB.
- A predictable core of canonical built-ins (math, array ops, formatting/IO) with stable behavior; broader or niche functionality ships as packages.
What it is not:
- Not a re-packaging of MATLAB. We don't ship MATLAB code, assets, or toolboxes.
- Every historical builtin. We prioritize a small, consistent core and let packages provide breadth.
- Not affiliated with MathWorks; not a drop-in replacement for every workflow.
Legal clarity: RunMat is an independent project that implements a compatible language runtime. “MATLAB” is a MathWorks trademark; we use it nominatively to describe the language whose grammar and semantics our compiler/interpreter accepts. We are not endorsed by or associated with MathWorks.
Performance
On an Apple M2 Max (32GB), our micro-benchmarks (matrix ops, math functions, control-flow loops) show large speedups over GNU Octave on the same machine:
Summary results
| Benchmark | GNU Octave avg (s) | RunMat interp avg (s) | RunMat JIT avg (s) | Speedup vs Octave |
|---|---|---|---|---|
| Startup Time | 0.9147 | 0.0050 | 0.0053 | 172x–183x faster |
| Matrix Operations | 0.8220 | 0.0050 | 0.0050 | 164x faster |
| Mathematical Functions | 0.8677 | 0.0057 | 0.0053 | 153x–163x faster |
| Control Flow | 0.8757 | 0.0057 | 0.0057 | 155x faster |
- We don't compare to MATLAB here due to licensing constraints (we decline to install Matlab and agree with their license terms). Our focus is the design: a slim core and a modern engine.
- Benchmarks are in the repo under
/benchmarkswith a script to reproduce. Numbers vary by hardware, BLAS, and build settings; please measure on your workload. To reproduce locally:
cd benchmarks
./run_benchmarks.sh
cat results/benchmark_YYYYMMDD_HHMMSS.yamlFor a broader landscape view, see our comparison of RunMat vs Octave, Julia, and Python in the MATLAB alternatives guide.
How it works
- VM interpreter: immediate execution, great for REPL and scripts.
- Turbine JIT: hot functions get compiled to optimized machine code (Cranelift backend).
- Slim builtins: a curated set in core; everything else via packages. Docs are generated from runtime metadata.
- Great developer experience: fast CLI workflows, flow-sensitive inference, helpful diagnostics, and more.
- Portable: single binary, no dependencies, runs on Linux/macOS/Windows and embedded devices.
- GPU-optimized: built in, configurable, swappable GPU planner with automatic fusion and data residency. Run your code on GPUs without any modifications across CPU, Metal (macOS), DirectX 12 (Windows), and Vulkan (Linux) via the wgpu backend. Additional backends (CUDA, ROCm, OpenCL) are planned.
For a deeper dive, see the RunMat runtime overview, compiler pipeline, and GPU architecture.
Packages: extending the runtime
Two ways to add capabilities:
- Native (Rust) packages: implement built-ins with
#[runtime_builtin], get strong typing and speed, and ship as a dynamic library. - Source (MATLAB) packages: ship
.mfiles; RunMat interprets or compiles them.
Documentation is generated from runtime metadata, so everything you add shows up in the reference automatically.
What you can run today
- Core language: arrays, slicing (
end, colon, logical masks), functions and multiple returns, cells/structs, OOP (classdefwith properties/methods),try/catch,global,persistent, function handles, command-form. - Extensive builtin coverage in the runtime (canonical math like
sin/cos/tan, reductions likesum/min/max, basic string/formatting viafprintf/sprintf, array creation likezeros/ones/eye, linear algebra, FFT/signal processing, statistics, and I/O), with additional functions available through packages.
If your code relies on many niche built-ins, the recommended path is to move those pieces into packages. The docs call out differences and migration notes where they exist.
Editor's note (April 2026): A lot has changed since this launch post. Here is a summary of what has shipped since August 2025:
- Plotting is no longer a work in progress. RunMat now supports 17+ GPU-accelerated plot types including
surf,contour,bar,pie,quiver,stem,area,errorbar, and full 3D variants, with graphics handles, styling, and figure export. See the plotting guide for runnable examples or the plotting docs for reference.- Browser sandbox — A full browser-based IDE is now available at runmat.com/sandbox, running entirely client-side via WebAssembly and WebGPU. See the browser guide.
- ~330+ builtins are now documented in the function reference, covering arrays, linear algebra, FFT/signal, statistics, strings, I/O, and plotting.
- GPU fusion now has dedicated documentation covering 7 fusion patterns: elementwise chains, reductions, matmul epilogues, covariance, power-step normalization, explained variance, and image normalization.
- Collaboration and teams — Organizations, project roles, real-time sync, and API keys are now available through RunMat App.
- Versioning — Automatic per-file versioning, project snapshots, and git export are built in.
- Desktop app — A native desktop application is in active development.
The runtime is now at v0.3.2. The original content below reflects the state at launch and remains accurate for the core architecture and design philosophy.
MATLAB, Octave, RunMat — a quick contrast
- MATLAB: proprietary, massive standard library, heavy startup, license-gated deployment. Feature-rich; closed source.
- GNU Octave: free, community-driven project with partial compatibility with MATLAB scripts. It carries a broad builtin surface and a classic interpreter architecture, but startup times and hot-loop performance can be poor. Octave is a full application; its design optimizes for breadth and compatibility.
- RunMat: open-source, modern engine with full language grammar and core semantics. We deliberately keep the core small and fast (canonical built-ins only) and move breadth into packages. This lets us optimize the engine aggressively for performance and predictability while still enabling a large library surface via the package system.
Try it & get involved
- Read the docs: Getting Started, Runtime, and Function Reference.
- Browse the builtin reference; it's generated from the runtime.
- Star the repo and open issues: https://github.com/runmat-org/runmat
- Interested in contributing? Packages are the best place to start (Rust or MATLAB source).
RunMat is not affiliated with MathWorks, Inc. “MATLAB” is a registered trademark of MathWorks, Inc. We reference it nominatively to describe the language whose grammar and semantics our independent runtime accepts.
RunMat is a free, open source community project developed by Dystr.
Related posts

Introducing RunMat Desktop: a high-performance MATLAB alternative
RunMat Desktop is a local, GPU-accelerated workspace for MATLAB-syntax code: editor, plots, variables, notebooks, run history, and an agent that can inspect your project.

RunMat Runtime 0.5 is out: multi-file project support, and resolving MATLAB language semantics like Rust's compiler
RunMat Runtime 0.5 adds manifest-backed multi-file projects, named entrypoints, stronger MATLAB function/class/indexing semantics, and a shared compiler foundation for tooling, acceleration, and JIT work.

Inside the RunMat Runtime: a Rust-like compiler pipeline to resolve MATLAB language semantics
A technical look at RunMat's Rust-like compiler pipeline for resolving MATLAB semantics across projects, functions, classes, indexing, bytecode, tooling, acceleration, and JIT work.
Enjoyed this post? Join the newsletter
Monthly updates on RunMat internals, development, and performance tips.
Download RunMat
Download RunMat for full performance, or use RunMat in your browser for zero setup.