# 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. - Built by Dystr Inc., Apache 2.0 licensed, written in Rust - Runs in the browser via WebAssembly (no install, no login, no server) or as a native binary on macOS, Linux, Windows - GPU acceleration on any vendor (Metal, Vulkan, DX12, WebGPU) -- not CUDA-only like MATLAB's Parallel Computing Toolbox - 1,000+ built-in functions across numerical computing, data, plotting, signal processing, file I/O, and engineering workflows - Full classdef OOP: properties, methods, events, handle classes, enumerations, operator overloading, metaclass - Interactive 2D and 3D plotting rendered directly from GPU memory - Automatic file versioning, project snapshots, and collaboration (no git required) - Single-binary deployment for air-gapped / ITAR-compliant environments ## 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 - Browser-native -- sandbox runs client-side via WebAssembly with no install; free account unlocks persistence, versioning, and collaboration - Memory safety via Rust -- eliminates entire classes of memory bugs - 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) - Auditable numerical correctness -- every numerical builtin traces to a named reference implementation (rustfft, nalgebra, LAPACK, or the CPU path), a pinned version, and an automated parity test with a documented tolerance; see the Numerical Correctness 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, function/cell expansion into slice targets - 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 is designed for broad compatibility with MATLAB syntax and existing `.m` projects. It supports variables, operators, control flow, functions, indexing, full classdef OOP, packages, imports, and multi-file projects, plus 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. 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; using the built-in agent 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. ## 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 - [Desktop/Browser Guide](https://runmat.com/docs/desktop/getting-started/install): IDE walkthrough ## Documentation - [MATLAB Compatibility](https://runmat.com/docs/runtime/getting-started/compatability): What works, what doesn't, and where RunMat goes beyond MATLAB and Octave - [Function Reference](https://runmat.com/docs/reference/builtins): More than 1,000 supported built-in functions - [Language Coverage](https://runmat.com/docs/runtime/getting-started/compatability): Detailed matrix of supported MATLAB syntax and semantics - [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 ## RunMat App - [Introducing RunMat App](https://runmat.com/blog/introducing-runmat-cloud): Persistent projects, run history, version snapshots, and team collaboration - [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 for large numerical artifacts - [Restoring Historical Run State](https://runmat.com/blog/restoring-historical-run-state-scientific-numerical-calculations): Inspect past runs without re-execution - [Pricing](https://runmat.com/pricing): Free tier (100 MB) through Enterprise ## Key Comparisons - [MATLAB Online Alternative](https://runmat.com/matlab-online): Side-by-side comparison of RunMat vs MATLAB Online - [Free MATLAB Alternatives](https://runmat.com/blog/free-matlab-alternatives): Benchmarked comparison of RunMat, Octave, Julia, Python - [Benchmarks](https://runmat.com/benchmarks): Performance data (82x faster than PyTorch on 1B-point elementwise math) ## GPU Acceleration - [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 ## Numerical Correctness - [Correctness & Trust](https://runmat.com/docs/runtime/development/testing): Every numerical builtin is backed by a named reference implementation (established Rust crates, optional FFI to system BLAS/LAPACK, or RunMat's own CPU path for GPU kernels) and an automated parity test with a documented tolerance. Tests run with standard `cargo test` against a fresh `git clone` of the public repository. ## Guides - [MATLAB Plotting Guide](https://runmat.com/blog/matlab-plotting-guide): 20+ runnable examples covering line plots, scatter, bar, 3D surfaces, contour, subplots, animations, and GPU-accelerated rendering - [MATLAB FFT Guide](https://runmat.com/blog/matlab-fft-guide): Computing and plotting FFT spectra with MATLAB syntax — single-sided spectra, windowing, 2D FFT, and GPU-accelerated visualization ## Debugging and Diagnostics - [fprintf and Modern Debugging](https://runmat.com/blog/matlab-fprintf): Why fprintf is a poor debugger and what RunMat provides instead (variable explorer, structured logging, execution tracing) ## Enterprise and Air-Gap - [Mission-Critical Math: Air-Gap Deployment](https://runmat.com/blog/mission-critical-math-airgap): Single-binary deployment for ITAR-compliant, air-gapped environments with GPU acceleration, collaboration, and audit trails ## 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 ## 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/getting-started/compatability - 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