Editor's note: RunMat, one year later
This article was originally published in August 2025, when RunMat launched as an open-source command-line runtime for MATLAB-syntax code. That first release included 87 built-in functions, a basic set of 2D and 3D plotting tools, and the Turbine JIT compiler.
Since then, 4,000 unique users have run an
.mscript with RunMat, with more than 35,000 script runs in total. The runtime has grown to more than 1,200 built-in functions spanning tables and timetables, statistics and machine learning, plotting, signal processing, text analytics, deep learning, finance, file I/O, graphs, and geometry. We also added automatic GPU acceleration across NVIDIA, AMD, Intel, and Apple hardware.RunMat now includes a zero-install browser sandbox, persistent projects with run history and versioning, multi-file project support, and a native desktop app for working with local files and hardware. We also launched a runtime-aware agent that can write and run code, inspect variables and plots, and return reviewable changes, alongside a growing FEA and geometry engine for engineering simulation.
That is a lot of progress in our first year, and we are still moving quickly. Follow the RunMat changelog for everything we ship next, or subscribe to the newsletter for regular updates.
The original introduction continues below.
TL;DR
RunMat is a modern, open-source runtime for MATLAB-syntax code. It implements the full language grammar and core semantics in Rust, with an interpreter for immediate execution, a JIT compiler for hot code, and a generational garbage collector tuned for numerical workloads.
The runtime is designed around a small, fast core and a package system that can grow through native Rust or MATLAB-syntax source. In our launch benchmarks on an Apple M2 Max, RunMat was 150–180x faster than GNU Octave across startup, matrix operations, mathematical functions, and control flow. The benchmarks and reproduction steps are included below.
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.
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.
Related posts
RunMat Turns One: What We Built and What Comes Next
RunMat's first year: how v0.0.1 grew from a CLI with 87 built-in functions into a GPU-accelerated runtime for the browser, RunMat Cloud, and Desktop.

Switching from MATLAB to Julia
A practical guide to switching from MATLAB to Julia, covering syntax, arrays, performance, packages, Simulink, team training, deployment, and validation.

MATLAB FFT Guide: Recorded Data Frequency Analysis
Load recorded CSV data, validate sampling, compute a single-sided FFT, compare PSD estimates, inspect a spectrogram, and verify a low-pass filter.
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.