RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.2, Nov 26, 2026 ·

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
    • Parallel Execution
    • Remote Execution
Docs>Runtime>Sessions and Execution

Workspace State

The session workspace has two jobs: provide fast VM slot access during execution, and expose stable variable identities to hosts after execution. It does this with three related data structures.

StructureScopePurpose
variable_array: Vec<Value>Current executionMutable VM storage indexed by bytecode slots.
workspace_bindings: HashMap<String, SessionWorkspaceBinding>SessionMaps variable names to current VM slots and ABI binding keys.
workspace_values: HashMap<String, Value>SessionDurable variable values retained between execution requests.

Slot Lifecycle

Loading diagram...

Before execution, the session prepares variable_array from existing workspace_values according to the compiled bytecode layout. During execution, the VM and runtime maintain active workspace state for assignments, clears, and workspace-aware builtins. After successful execution, the session harvests that state, rebuilds workspace_values, updates workspace_bindings, and emits a delta.

Binding Keys

Workspace entries carry stable ABI identities:

Key typeWhen used
InteractiveREPL or notebook-style execution tied to a session UUID and variable name.
SourceBindingPath/text source execution with a source identity and definition path.
GlobalReserved ABI identity for global bindings.
PersistentReserved ABI identity for persistent function locals.

For text or path sources, resolve_source_identity can produce either interactive identity or a path/content-hash identity. Hosts should treat these keys as identifiers, not as display strings.

Deltas And Full Snapshots

Every successful request returns a WorkspaceDelta. The session attempts to emit only changed upserts when possible. It asks for a full snapshot when removal or clear behavior means a host cannot update safely from upserts alone.

Delta fieldMeaning
versionMonotonic session workspace version.
upsertsUpdated binding values.
removalsBinding keys removed since the previous request.
full_snapshot_requiredHost should replace its workspace view with the returned full snapshot.

clear_variables clears slots, binding keys, persistent values, and preview tokens. Workspace import also clears the current workspace before installing restored variables.

Display And ans

The session derives display behavior from HIR statements and VM layout:

  • Unsuppressed assignments can display the assigned variable value.
  • Unsuppressed expression statements are stored into ans.
  • Semicolon-suppressed statements do not produce a public value, but may still carry type_info.
  • Some builtins suppress automatic output even without a semicolon.

This policy lives above the VM. The VM executes bytecode and mutates slots; the session decides what becomes display output, what updates ans, and what is hidden from the public RuntimeFlow.

On this page
  • Slot Lifecycle
  • Binding Keys
  • Deltas And Full Snapshots
  • Display And ans