| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
MATLAB-compatible runtime for fast GPU-accelerated math.
Download RunMat | Docs | Changelog | Benchmarks
RunMat is an open-source, high-performance runtime designed for numerical computing using MATLAB-style syntax. It is built in Rust and provides a multi-tiered execution model that targets both CPU and GPU hardware without requiring manual management of tensor allocations and movement.
The system is designed to be a drop-in runtime for .m files, offering automatic operation fusion, a high performance compiler, and a cross-platform GPU backend powered by wgpu.
Key Capabilities:
Note
RunMat is pre-1.0 software. The core runtime, CLI, GPU engine, and TypeScript bindings are usable today, but compatibility coverage is still expanding.
The quickest way to get started with RunMat is to download the RunMat Desktop application.
Alternatively, you can install the CLI:
# Linux/macOS
curl -fsSL https://runmat.com/install.sh | sh
# Windows PowerShell
iwr https://runmat.com/install.ps1 | iexCreate a script hello.m:
disp("Hello, World!");
A = magic(3);
disp(sum(A));Run the script:
runmat hello.mSee Hello World for more examples, and the Command Line Interface for the full command surface.
# Homebrew (macOS/Linux)
brew install runmat-org/tap/runmat
# Cargo (Rust)
cargo install runmat --features gui
# Build from source
git clone https://github.com/runmat-org/runmat.git && cd runmat
cargo build -p runmat --release --features guiThe CLI can run local scripts or named project entrypoints - on local or remote projects.
runmat analysis.m
# which is shorthand for:
runmat run analysis.mProjects can define named entrypoints in runmat.toml:
[package]
name = "demo"
[entrypoints.main]
path = "src/main.m"Run the entrypoint:
runmat run mainTo run a script in a remote project backend, ensure you are authenticated and have selected a project:
runmat login
# or explicitly specify the server URL
runmat login --server https://api.runmat.com
runmat project select <project-id>And then run the script:
runmat remote run /scripts/analysis.mThe script is executed locally with the remote filesystem provider mounted into the runtime's filesystem abstraction. This means that mutations to the filesystem are persisted to the remote project, but the script runs locally.
For the full command surface, see Command Line Interface.
The runmat npm package embeds the runtime in browser, worker, Electron, and Node-based hosts.
npm install runmatimport { initRunMat } from "runmat";
const session = await initRunMat();
const result = await session.executeRequest({
source: {
kind: "text",
name: "<repl>",
text: "A = magic(3); disp(A)"
}
});
console.log(result.stdout);
console.log(result.workspace.values);
session.dispose();The TypeScript API includes session execution, workspace snapshots, lazy variable materialization, filesystem providers, plotting surfaces, stdout subscriptions, runtime diagnostics, and GPU status reporting.
See bindings/ts/README.md and WASM & TypeScript/JavaScript.
| Area | Crates and paths |
|---|---|
| Language frontend | runmat-lexer, runmat-parser, runmat-hir, runmat-mir, runmat-static-analysis |
| Execution | runmat-core, runmat-vm, runmat-runtime, runmat-builtins |
| Native execution and compilation | runmat-native-executor, runmat-jit, runmat-native-codegen, runmat-aot |
| GPU acceleration | runmat-accelerate, runmat-accelerate-api |
| Memory management | runmat-gc, runmat-gc-api |
| Plotting | runmat-plot |
| Filesystem and config | runmat-filesystem, runmat-config |
| CLI and remote services | runmat-cli, runmat-server-client |
| Browser bindings | runmat-wasm, bindings/ts |
| Tooling | runmat-lsp, runmat-telemetry, runmat-logging |
The runtime is host-neutral. The CLI, WASM bindings, LSP, and future application hosts all submit source through the same session/execution boundary and consume structured results.
RunMat's acceleration engine captures array operations into fusion plans, estimates whether CPU or GPU execution is better for the current shapes, and keeps tensors resident on device when downstream work can reuse them.
x = rand(10_000_000, 1, "single");
y = sin(x) .* exp(-x / single(10));
z = tanh(y) + single(0.1) .* y;
m = mean(z, "all");Elementwise chains and reductions like this can be fused into larger GPU dispatches without writing kernel code. Smaller workloads can stay on CPU when transfer overhead would dominate.
See GPU Acceleration & Fusion Engine.
RunMat includes an open plotting engine used by the CLI, browser sandbox, and TypeScript bindings.
x = 0:0.1:10;
plot(x, sin(x));
title("Sine wave");
grid on;See Plotting System.
Start here:
Runtime internals:
The full docs index is docs/README.md.
The benchmarks directory contains reproducible cross-language comparisons against NumPy, PyTorch, Octave, and Julia where applicable.
Representative published runs include:
| Benchmark | Result |
|---|---|
| Monte Carlo GBM risk simulation | Up to 131x faster than NumPy on the published sweep. |
| Elementwise math | Up to 144x faster than PyTorch at 1B elements on the published sweep. |
| 4K image preprocessing | Up to 10x faster than NumPy on the published sweep. |
Run the suite:
python3 benchmarks/.harness/run_suite.py \
--suite benchmarks/.harness/suite.json \
--output results/suite_results.jsonBenchmark results depend on hardware, driver stack, backend selection, and workload shape. The benchmark harness records device details and parity checks with each run.
Install the Rust toolchain from rust-toolchain.toml, then build the workspace:
cargo build
cargo testBuild the CLI with plotting support:
cargo build -p runmat --release --features guiWork on the TypeScript/WASM package:
cd bindings/ts
npm install
npm run build
npm testUseful docs:
RunMat is licensed under the Apache License 2.0.
RunMat is a registered trademark of Dystr Inc. MATLAB is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.
| Back | FazBrowse Home | New Git URL |