RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact
  • License
  • Privacy

Learn

  • Docs
  • Blog
  • Benchmarks
  • RunMat vs MATLAB Online

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

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.

/
    • Session Engine
    • Execution Requests
    • Workspace State
    • Variable Inspection
    • Workspace Replay
    • Interaction & Streams
    • Host Integration
    • Execution
    • Async Execution
    • Errors & Diagnostics
    • Remote Execution
Docs>Runtime>Sessions and Execution

Session Engine

runmat-core owns the host-agnostic execution session. A RunMatSession is the long-lived object that a REPL, notebook host, CLI command, or WebAssembly wrapper uses to submit MATLAB source, keep workspace variables alive, preserve user-defined functions, expose inspection data, handle input, and return structured execution results.

The session is not a second compiler or a second VM. It is the orchestration layer around the parser, HIR/MIR pipeline, VM, adaptive native JIT, runtime builtins, GPU provider state, and host-facing ABI.

Execution Spine

Loading diagram...

What The Session Owns

Field or subsystemPurpose
variable_arrayVM slot storage used during the current execution.
workspace_bindingsName-to-slot mapping plus stable ABI binding identity.
workspace_valuesDurable variable values retained between requests.
function_registryUser-defined semantic functions retained across interactive inputs.
source_poolInterned source text and names for diagnostics and call stacks.
interrupt_flagCooperative cancellation flag shared with the runtime and VM.
async_input_handlerHost callback for input, keypress, and pause-like interactions.
stats, profiling, telemetryExecution counters and optional host analytics hooks.
compat_mode, top_level_await_enabledPer-session defaults that can be overridden by a request.

RunMatSession rejects concurrent execution on the same session. Hosts that need parallel execution should create separate sessions or serialize requests through one session.

Page Map

PagePurpose
Execution RequestsThe structured request/result ABI around session execution.
Workspace StateHow variable slots, stable binding keys, deltas, removals, and ans work.
Variable InspectionWorkspace entries, previews, materialization, preview tokens, and GPU slices.
Workspace ReplayExporting and restoring live workspace state.
Interaction & StreamsConsole streams, warnings, async input, cancellation, diagnostics, and effects.
Host IntegrationCLI, WASM/TypeScript, notebook, editor, and lifecycle responsibilities.

For the compiler stages inside compile_input, see Compilation Pipeline. For bytecode execution details, see VM Interpreter & Bytecode. For native execution, see JIT Compiler.

On this page
  • Execution Spine
  • What The Session Owns
  • Page Map