Configuration Reference
RunMat utilizes a hierarchical configuration system that manages project-level metadata, source organization, and runtime execution parameters. The configuration is primarily driven by a manifest file (runmat.toml or runmat.json) and can be overridden by environment variables and CLI arguments.
For a user-facing guide to project layout, source roots, dependencies, and named entrypoints, see Projects . This page is the reference for manifest and runtime settings.
RunMat resolves configuration settings using a specific precedence. Lower-numbered levels are overridden by higher-numbered levels:
Built-in Defaults
Project Manifest: Settings found in runmat.toml or runmat.json. The system automatically discovers this file by walking up the directory tree from the source file being executed
Environment Variables: Variables such as RUNMAT_CONFIG or RUNMAT_JIT_THRESHOLD
CLI Arguments: Explicit flags passed to the runmat binary (e.g., --no-jit or --gc-preset)
[package]
name = "my-project"
version = "0.1.0"
runmat-version = ">=0.4.0"
[dependencies]
utils = { path = "../utils" , version = "0.1.0" }
[entrypoints.hello]
path = "hello.m"
[runtime.language]
compat = "runmat"
You can then execute the project's hello entrypoint with:
Project sections describe package identity, source layout, dependencies, and named entrypoints.
Key Type Default Notes namestring required Package identifier. versionstring unset Package version metadata. runmat-versionstring unset Minimum RunMat version gate. Accepts >=x.y.z or x.y.z.
Key Type Default Notes rootsstring[] required Source root directories, relative to the config file directory.
Each dependency is keyed by alias.
[dependencies]
utils = { path = "../utils" , version = "0.1.0" }
Field Type Default Notes pathstring unset Local dependency path. Required for local composition today. versionstring unset Version metadata for dependency declaration.
[entrypoints.<name>]
Define named targets that can be executed from CLI.
[entrypoints.main]
module = "app.main"
function = "main"
[entrypoints.batch]
path = "scripts/run_batch.m"
Field Type Default Notes pathstring unset File target (.m extension inferred if omitted). modulestring unset Module path under source roots. functionstring unset Function name for module target.
Exactly one target mode is required: path or module + function.
Entrypoint CLI examples:
runmat run main
runmat benchmark main --iterations 25 --jit
All runtime settings are under [runtime]. Runtime settings control the behavior of the RunMat runtime.
Key Type Default Notes callstack_limitinteger 200Max retained call stack frames for diagnostics. error_namespacestring ""Error ID namespace. Empty value is normalized at startup by language compatibility mode (set to RunMat in compat = "runmat" mode). verboseboolean falseEnables verbose execution output. snapshot_pathstring unset Optional snapshot file to preload.
Key Type Default Allowed values Notes compatstring "runmat"runmat, matlab, strictLanguage compatibility mode.
See MATLAB Language Compatability for more details on runtime language compatibility modes.
Key Type Default Notes enabledboolean trueEnables JIT compilation. thresholdinteger 10Executions before JIT tiering triggers. optimization_levelstring "speed"none, size, speed, aggressive.
Key Type Default Notes presetstring unset low-latency, high-throughput, low-memory, debug.young_size_mbinteger unset Young generation size override (MB). threadsinteger unset GC worker thread override. collect_statsboolean falseEnables GC statistics collection.
Key Type Default Notes enabledboolean trueEnables acceleration subsystem. providerstring "wgpu"auto, wgpu, inprocess.allow_inprocess_fallbackboolean trueFalls back to in-process provider if hardware provider fails. wgpu_power_preferencestring "auto"auto, high-performance, low-power.wgpu_force_fallback_adapterboolean falseForces WGPU fallback adapter selection.
Key Type Default Notes enabledboolean trueEnables auto-offload planner. calibrateboolean trueEnables calibration mode for planner profile generation. profile_pathstring unset Optional profile cache path. log_levelstring "trace"off, info, trace.
Key Type Default Notes modestring "auto"auto, gui, headless.force_headlessboolean falseForces non-interactive rendering behavior. backendstring "auto"auto, wgpu, static, web.scatter_target_pointsinteger unset Optional scatter decimation target. surface_vertex_budgetinteger unset Optional surface vertex LOD budget.
Key Type Default Notes widthinteger 1200Default GUI window width. heightinteger 800Default GUI window height. vsyncboolean trueEnables VSync. maximizedboolean falseStarts window maximized.
Key Type Default Notes formatstring "png"png, svg, pdf, html.dpiinteger 300Raster export DPI. output_dirstring unset Default export output directory.
Key Type Default Notes enabledboolean trueEnables telemetry client. show_payloadsboolean falseEchoes serialized payloads to stdout. http_endpointstring unset Optional HTTP override. When unset, runtime uses built-in collector endpoint. udp_endpointstring "udp.telemetry.runmat.com:7846"UDP collector endpoint. queue_sizeinteger 256Async telemetry queue size (minimum bounded internally). sync_modeboolean falseSends telemetry synchronously on caller thread. drain_modestring "all"none, all.drain_timeout_msinteger 50Max drain wait on shutdown (capped internally). require_ingestion_keyboolean trueDisables telemetry if key is required but unavailable.
Key Type Default Notes levelstring "warn"error, warn, info, debug, trace.debugboolean falseForces debug logging path. filestring unset Reserved log file path option (runtime currently logs to process logger).
RUNMAT_CONFIG: absolute or relative path to runmat.toml / runmat.json
RUNMAT_API_KEY
RUNMAT_SERVER_URL
RUNMAT_ORG_ID
RUNMAT_PROJECT_ID
RUNMAT_TELEMETRY_KEY (ingestion key override)
[package]
name = "image-pipeline"
version = "0.1.0"
runmat-version = ">=0.4.0"
[sources]
roots = [ "src" , "lib" ]
[dependencies]
utils = { path = "../utils" , version = "0.1.0" }
[entrypoints.main]
module = "app.main"
function = "main"
[entrypoints.batch]
path = "scripts/run_batch.m"
[runtime]
callstack_limit = 200
error_namespace = "RunMat"
verbose = false
[runtime.language]
compat = "runmat"
[runtime.jit]
enabled = true
threshold = 10
optimization_level = "speed"
[runtime.gc]
preset = "low-latency"
young_size_mb = 128
threads = 8
collect_stats = false
[runtime.accelerate]
enabled = true
provider = "wgpu"
allow_inprocess_fallback = true
wgpu_power_preference = "auto"
wgpu_force_fallback_adapter = false
[runtime.accelerate.auto_offload]
enabled = true
calibrate = true
profile_path = ".runmat/auto_offload.json"
log_level = "trace"
[runtime.plotting]
mode = "auto"
force_headless = false
backend = "auto"
scatter_target_points = 250000
surface_vertex_budget = 400000
[runtime.plotting.gui]
width = 1200
height = 800
vsync = true
maximized = false
[runtime.plotting.export]
format = "png"
dpi = 300
output_dir = "artifacts/figures"
[runtime.telemetry]
enabled = true
show_payloads = false
udp_endpoint = "udp.telemetry.runmat.com:7846"
queue_size = 256
sync_mode = false
drain_mode = "all"
drain_timeout_ms = 50
require_ingestion_key = true
[runtime.logging]
level = "warn"
debug = false