# RunMat RunMat is a math and physics calculation engine designed for broad compatibility with MATLAB syntax and existing `.m` projects. It lets you model, simulate, and analyze complex systems with automatic GPU acceleration. It is available from the CLI, as a collaborative desktop app, and in the web browser. > MATLAB was designed in an era of single-threaded CPUs, local-only licenses, and > no internet. RunMat is what a technical computing runtime looks like built today: > open source, browser-native, GPU-accelerated on any vendor, AI-native, with > built-in versioning and collaboration. It runs MATLAB-syntax code (.m files) with > no license required -- in the browser, on the desktop, or from the CLI. RunMat is built by Dystr Inc. and is Apache 2.0 licensed. The runtime is written in Rust and compiles to WebAssembly for browser execution or runs as a native binary on macOS, Linux, and Windows. RunMat is designed for broad compatibility with MATLAB syntax and existing `.m` projects. It supports variables, operators, control flow, functions, N-D indexing, full classdef OOP, packages, imports, exceptions, and multi-file projects. It includes more than 1,000 built-in functions across numerical computing, data, plotting, signal processing, file I/O, and engineering workflows. RunMat runs supported MATLAB-language `.m` projects without RunMat-specific modifications. Compatibility still depends on project-specific products, file formats, and integrations, so test the workflow against the current RunMat release. Simulink block diagrams and GUIDE/App Designer graphical applications remain separate workflows. ## Who RunMat is for - Engineers, researchers, and students who want to run MATLAB-syntax code without a paid license - Teams that need GPU acceleration without CUDA lock-in or a separate Parallel Computing Toolbox purchase - Organizations that need air-gapped, single-binary deployment with no license server - Anyone who wants to try MATLAB-style computation instantly in a browser with no install ## Who RunMat is not for - Teams whose workflows depend entirely on Simulink block-diagram modeling ## Where RunMat goes beyond MATLAB - GPU-native execution on any vendor (NVIDIA, AMD, Intel, Apple) via Metal, Vulkan, DX12, WebGPU -- not CUDA-only - Automatic device planning and kernel fusion -- the runtime picks CPU vs GPU and fuses sequential operations into fewer kernels - Zero-temporary slice expansion -- function/cell outputs write directly to destination slices without intermediate copies - Memory safety via Rust -- eliminates entire classes of memory bugs - Browser-native -- sandbox runs client-side via WebAssembly with no install; free account unlocks persistence, versioning, and collaboration - Non-blocking execution -- code runs asynchronously; the IDE stays interactive during long computations and GPU readbacks never stall the browser - Built-in versioning -- automatic per-save file history and project snapshots without requiring git - Built-in agent co-designed with the runtime -- executes code, inspects workspace variables and plots, and proposes reviewable diffs for script adaptation (see section below) ## Where RunMat goes beyond GNU Octave - Full classdef OOP (properties, methods, events, handle classes, enumerations, operator overloading, metaclass) - import/package system with MATLAB-parity precedence - N-D end arithmetic across dimensions in both gather and scatter - Function/cell expansion into slice targets with dynamic packing - Uniform MException identifier/message model - Automatic GPU acceleration (Octave has no GPU support) - String arrays with MATLAB-parity indexing and comparison ## Migrating MATLAB code to RunMat RunMat supports broad MATLAB-syntax compatibility, packages, classes, multi-file projects, and more than 1,000 built-in functions across engineering workflows. RunMat runs supported MATLAB-language `.m` projects without RunMat-specific modifications. The fastest evaluation is to run the real project against the current release. If a compatibility gap appears, the built-in agent can inspect the diagnostics and propose reviewable edits. The fastest way to check if your code runs: open the [browser sandbox](https://runmat.com/sandbox), paste your .m script, and hit Run. No install, no account required. Code execution is local. If something doesn't work, try asking the built-in agent to adapt it (agent use sends context to the configured LLM provider). ## Built-in Agent RunMat includes a built-in agent co-designed with the runtime -- not a chat window bolted onto the side of an existing environment. The agent connects directly to live runtime sessions: it can execute code, inspect workspace variables and their shapes, see 2D/3D plot output, and read project files. Edits are presented as reviewable diffs (accept, reject, or accept in part), not silent overwrites. Sessions are persisted and replayable. This is architecturally different from MATLAB's Agentic Toolkit, which connects external AI coding agents to a local MATLAB installation via MCP. In RunMat, the agent is a participant in the same runtime session the user is working in, with access to the same workspace state, the same GPU-accelerated execution, and the same project history. Policy controls (destructive-action prevention, network access, permission prompts) are built into the harness. The agent is provider-agnostic -- it works with multiple model providers without vendor lock-in. The agent helps investigate compatibility gaps by running the code, reading diagnostics, inspecting workspace and plot state, and proposing reviewable edits. It can also convert command-form syntax to explicit parenthesized form for teams moving toward strict mode. Project-specific validation remains important, especially for Simulink models and graphical application workflows. ## Architecture RunMat has a two-tier architecture: 1. **Browser Sandbox** (https://runmat.com/sandbox): Runs entirely client-side via WebAssembly. No account, no login, no install. Code executes on the user's own device. Using the built-in agent sends context to the configured LLM provider. If the browser supports WebGPU (Chrome, Edge, Safari 18+, Firefox 139+), RunMat automatically routes computation to the local GPU. Works offline after initial page load. Includes a built-in editor with linting and autocomplete, interactive 2D and 3D plotting, and async (non-blocking) execution. 2. **RunMat App**: Free accounts include private persistent projects, server-backed project storage, file versioning, project snapshots, collaboration, and Desktop local-folder persistence. Enterprise adds SSO, SAML, SCIM, compliance, private deployment, managed FEA, and extended-history controls. ## Getting Started - [Browser Sandbox](https://runmat.com/sandbox): Run MATLAB code instantly in your browser, no install or login - [Download CLI](https://runmat.com/download): Native binary for macOS, Linux, Windows - [Getting Started Guide](https://runmat.com/docs/runtime/getting-started/install): Setup and first steps - [RunMat Desktop](https://runmat.com/docs/desktop): Install Desktop and learn the workbench ## Documentation - [MATLAB Compatibility](https://runmat.com/docs/runtime/matlab-compatibility): Language semantics, project validation with `runmat check` and `runmat test`, supported built-ins, compatibility modes, and current boundaries. - [Function Reference](https://runmat.com/docs/reference/builtins): More than 1,000 supported built-in functions - [Architecture](https://runmat.com/docs/runtime/compiler): How RunMat works internally (Rust runtime, WebAssembly, GPU fusion) - [CLI Reference](https://runmat.com/docs/runtime/getting-started/cli): Command-line usage ## GPU Acceleration RunMat accelerates computation on any GPU vendor -- not CUDA-only like MATLAB's Parallel Computing Toolbox. Supported backends: Metal on macOS (M1/M2/M3/M4), Vulkan on Linux, DirectX 12 on Windows, WebGPU in the browser. No driver setup or paid toolbox required. The fusion engine automatically merges sequential array operations into fewer GPU kernels, reducing memory traffic and kernel launch overhead. For example, a chain like `sin(x) .* x + 0.5` followed by `mean(y)` can be fused into a single GPU pass instead of one kernel per operation. Performance benchmarks: 82x faster than PyTorch on 1-billion-point elementwise matrix math on a commodity Apple MacBook Pro M2. 150-180x faster than GNU Octave on the same workloads. - [Fusion Engine](https://runmat.com/docs/runtime/gpu): How RunMat fuses sequential ops into fewer GPU kernels - [GPU in MATLAB Guide](https://runmat.com/blog/how-to-use-gpu-in-matlab): GPU setup guide comparing MATLAB's CUDA-only approach with RunMat's cross-vendor alternative - [Benchmarks](https://runmat.com/benchmarks): Full benchmark results ## Numerical Correctness RunMat is designed so that every numerical result can be traced back to a named reference implementation and an automated test you can run locally. Engineers facing an audit can prove answers are correct without calling a vendor. Three mechanisms, stacked: inherited correctness from established Rust crates (`rustfft` for FFT, `nalgebra` for SVD and dense linear algebra, `num-complex` for complex arithmetic); optional FFI to platform-native BLAS and LAPACK (Apple Accelerate on macOS, OpenBLAS on Linux); and in-repo solvers (LU, QR, Cholesky, reductions, elementary math, signal, polynomials) validated against external references or RunMat's own CPU path. Tolerances are chosen per operation rather than by a universal rule, and every parity test runs with standard `cargo test` against a fresh `git clone` of the public repository -- no MATLAB license required. RunMat targets validated numerical accuracy within documented tolerances, not bit-identical reproduction across environments. - [Correctness & Trust](https://runmat.com/docs/runtime/development/testing): Full coverage table, methodology, worked FFT example, and reproducible commands ## Visualization and Plotting RunMat includes 40+ plotting builtins with interactive 2D and 3D rendering directly from GPU memory -- zero copy between computation and visualization. **2D chart types:** plot, scatter, bar, histogram, hist, area, stairs, stem, errorbar, pie, contour, contourf, image, imagesc, imshow, quiver, heatmap **3D chart types:** plot3, surf, surfc, mesh, meshc, scatter3 **Log-scale:** semilogx, semilogy, loglog **Figure management:** figure, subplot, hold, clf, cla, close, title, sgtitle, xlabel, ylabel, zlabel, legend, colorbar, colormap, axis, grid, box, shading, view, drawnow, pause **Handle graphics:** get, set 3D surface plots can be rotated, zoomed, and panned directly in the browser. The plot is rendered as part of the same GPU pipeline that computed the data, avoiding the CPU-GPU transfer overhead that other tools incur. Advanced/specialized chart types (polar, geobubble, etc.) are not yet supported. ## Debugging and Diagnostics RunMat replaces fprintf-based debugging with modern tooling: - Real-time type and shape tracking: hover any variable to see its dimensions, type, and values - Live syntax validation: mismatched matrix dimensions get red underlines before you run - Execution tracing: structured, timestamped diagnostic logs with severity levels - Variable explorer: inspect any variable's state without modifying code - [fprintf and Modern Debugging](https://runmat.com/blog/matlab-fprintf): Why fprintf is a poor debugger and what RunMat provides instead ## RunMat App RunMat App turns ephemeral computation into durable engineering state. Code, datasets, run history, workspace variables, figures, and snapshots become project state tied to a shared project instead of one machine. Key capabilities: - Automatic file history: every save creates a version. Browse the timeline and restore any previous state. No commits, no staging area. - Project snapshots: capture the entire project in one click. Restore instantly. - Run history: every execution is recorded. Inspect past runs, variables, and figures without re-execution. - Team collaboration: share projects with teammates. Historical runs, snapshots, and state are accessible to the whole team. - Large data persistence: chunked, content-addressed storage for large numerical artifacts. Only changed regions are rewritten -- a sequence of 10 follow-on runs changing 5 GB each on a 100 GB baseline costs ~150 GB total instead of 1.1 TB with naive full copies. - [Introducing RunMat App](https://runmat.com/blog/introducing-runmat-cloud): Full announcement with architecture details - [Version Control for Engineers](https://runmat.com/blog/version-control-for-engineers-who-dont-use-git): Automatic file history and snapshots without git - [Large Data Persistence](https://runmat.com/blog/ad-hoc-checkpoints-to-large-data-persistence): Chunked, content-addressed storage architecture - [Restoring Historical Run State](https://runmat.com/blog/restoring-historical-run-state-scientific-numerical-calculations): Inspect past runs without re-execution ## RunMat vs MATLAB Online | Feature | RunMat | MATLAB Online | |---------|--------|---------------| | License | Apache 2.0 open source, free | Requires paid MathWorks license | | Account | No account needed for sandbox | Account and sign-in required | | Execution | Client-side (your device) | Cloud-based (MathWorks servers) | | GPU | Any vendor (Metal, Vulkan, DX12, WebGPU) | CUDA-only, requires Parallel Computing Toolbox | | Offline | Works offline after initial load | Requires internet connection | | Time limits | None | 20 hours/month free, 15-minute idle timeout | | Function coverage | 1,000+ built-in functions across engineering workflows; project-specific validation recommended | Full MATLAB language + all toolboxes | | Version control | Built-in automatic versioning | None built-in | | Privacy | Execution is local; agent use sends context to LLM provider | Code uploaded to MathWorks servers | - [MATLAB Online Alternative](https://runmat.com/matlab-online): Full side-by-side comparison page ## Key Comparisons - [Free MATLAB Alternatives](https://runmat.com/blog/free-matlab-alternatives): Benchmarked comparison of RunMat, Octave, Julia, Python on real engineering workloads - [Benchmarks](https://runmat.com/benchmarks): Performance data across multiple workload types ## Pricing - **Free**: The complete self-serve product, including unlimited writable cloud and local projects, collaboration, uploads, RunMat Desktop, hosted Agent, unlimited signed-in embedded executions, Desktop MCP, and public/private packages. Includes 50 personal Agent credits per active member each month, 2 GB of shared cloud storage, and 30 days of version and run history. - **Paid resources**: Add organization-pooled Agent-credit packs or recurring storage capacity without changing plans. - **Enterprise**: Custom contracts for managed FEA workflows, extended history, SSO/SAML/SCIM, audit and compliance controls, private or air-gapped deployments, and dedicated support. Remote Parallel Workers are not generally available; book a call to discuss requirements. - [Pricing](https://runmat.com/pricing): Full pricing details and comparison table ## Enterprise and Air-Gap RunMat Enterprise deploys as a single binary for ITAR-compliant, air-gapped environments. Includes GPU acceleration, real-time collaboration, audit trails, and SSO -- all running fully offline with no external dependencies or license servers. - [Mission-Critical Math: Air-Gap Deployment](https://runmat.com/blog/mission-critical-math-airgap): Architecture and deployment details ## About - [About RunMat](https://runmat.com/about): Company and mission - [Why Rust](https://runmat.com/blog/why-rust): Why the runtime is built in Rust - [GitHub](https://github.com/runmat-org/runmat): Source code - Contact: team@runmat.com ## Compatibility Details - Language: Broad compatibility with MATLAB syntax, including variables and data types (double, single, char, string, logicals, integers, complex), all operators, control flow, named and anonymous functions, N-D indexing, full classdef OOP, packages, imports, exceptions, and multi-file projects - Built-in functions: More than 1,000 across numerical computing, data, plotting, signal processing, file I/O, and engineering workflows - Plotting: 40+ builtins covering 2D (plot, scatter, bar, histogram, area, stairs, stem, errorbar, pie, contour, contourf, image, imagesc, imshow, quiver, heatmap), 3D (plot3, surf, surfc, mesh, meshc, scatter3), log-scale (semilogx, semilogy, loglog), figure management (figure, subplot, hold, clf, cla, close, title, sgtitle, xlabel, ylabel, zlabel, legend, colorbar, colormap, axis, grid, box, shading, view, drawnow, pause), and handle graphics (get/set). GPU-first rendering with interactive 3D camera. - Separate workflows: Simulink block diagrams and GUIDE/App Designer graphical applications - Compatibility modes: "runmat" (default), "matlab" (MATLAB error namespaces), "strict" (explicit function calls only) - Full language coverage matrix: https://runmat.com/docs/runtime/matlab-compatibility - Full function reference: https://runmat.com/docs/reference/builtins ## Optional - [Blog](https://runmat.com/blog): All blog posts - [Resources Hub](https://runmat.com/resources): Guides and resources - [Roadmap](https://runmat.com/docs/changelog): Planned features