Ru

RunMat – a V8 inspired Rust runtime for the landlocked Matlab language

Hacker News

RunMat – a V8 inspired Rust runtime for the landlocked Matlab language

Why build this? MATLAB wasn’t chosen by engineers; it was inherited from classrooms. That unfair advantage let MathWorks sell a decades-old runtime with heavy startup, sluggish hot loops, and paywalled toolboxes. It milks about $500M a year out of the engineering ecosystem for what amounts to an outdated compiler and runtime stack. GNU Octave has been the main open-source way to run MATLAB code but it only supports a subset of the grammar and semantics, and its performance is far behind modern expectations. It’s more of a compatibility bridge than a true runtime alternative. I decided to implement a MATLAB language compiler and executor from scratch, grammar and semantics complete, in Rust with a modern architecture inspired by V8. Like V8, RunMat starts in a lightweight interpreter, then profiles and JITs hot paths using Cranelift. Snapshotting makes cold start essentially vanish (5ms vs 2–10s in MATLAB), and tensor operations run natively across CPUs or GPUs (CUDA, Metal, Vulkan) without an extra license. Performance (vs Octave, Apple M2 Max, 32GB): * Startup: 0.9147s → 0.005s (180× faster) * Matrix ops: 0.8220s → 0.005s (164×) * Math funcs: 0.8677s → 0.0053s (160×) * Control flow: 0.8757s → 0.0057s (154×) Unlike Octave, RunMat implements the full MATLAB grammar: arrays/indexing (end/colon/masks/N-D), multiple returns, varargin/varargout, classdef OOP, events/handles, metaclass, and standardized exceptions. The core is slim at 5MB static binaries for Linux, macOS, and Windows (or embedded devices and containers), with language extensibility coming from packages that can be written in MATLAB or in Rust. It’s 100% open source: The repo is about 3M characters of code, has over 1,000 tests covering the edges of the semantic surface, and was bootstrapped in three weeks. A package manager is next, along with a final draft of the builtin standard library. TLDR: Same language semantics, but rebuilt with modern methods, the way Chrome’s V8 redefined JavaScript engines.

Share card

Actual performance

15points
6comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: supports · Missing: reddit linkedin, podcasting, created
90%90% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: mac, macos, apple · Missing: agents, agent, cursor
84%84% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: open source, ide, 000 · Missing: https docs, excited, just released
72%72% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
45%45% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr, bootstrapped, sde · Missing: mrr, revenue, profit
27%27% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
21%21% predicted probability of success on AppSumo, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ra
Railcar – a container runtime in rust46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Railcar – a container runtime in rust

Hacker News17
Yo
Youki – A Container Runtime in Rust46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Youki – A Container Runtime in Rust

Hacker News1
Im
Implementing an Async Runtime in Rust37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Implementing an Async Runtime in Rust

Hacker News2
As
Asupersync, the Cancel-Correct Async Runtime for Rust44%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Asupersync, the Cancel-Correct Async Runtime for Rust

Hacker News3
EC
EC2 Management in Rust (Htop Inspired)59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

EC2 Management in Rust (Htop Inspired)

Hacker News3
Po
Polly: A templating language for Rust51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Polly: A templating language for Rust

Hacker News47
Em
Emu – Language for Gpgpu from Rust59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Emu – Language for Gpgpu from Rust

Hacker News3
Em
Emu – Language for Gpgpu Scripting from Rust57%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Emu – Language for Gpgpu Scripting from Rust

Hacker News3
Ru
Rust implementation of µKanren, a featherweight relational language54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Rust implementation of µKanren, a featherweight relational language

Hacker News2
Fa
Fastimer, runtime-agnostic timer traits and utils for Async Rust25%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fastimer, runtime-agnostic timer traits and utils for Async Rust

Hacker News2