</> APL Run Loading interactive WebAssembly workspace…

About APL Run & mAPL

APL Run is a high-performance APL and mAPL compiler written in Rust and compiled to WebAssembly. It combines standard Dyalog APL and GNU APL array programming with modern software-engineering capabilities.

Compiler Architecture

  • Bytecode Virtual Machine — Compiles dynamic functions (dfns) into compact vector bytecode instructions.
  • Element-Wise Loop Fusion — Merges chained array operations into single-pass register loops without intermediate array allocations.
  • Runtime WebAssembly AOT — Emits raw WebAssembly modules in the browser for scalar recursive dfns, JIT-compiled to machine code by V8.
  • WebGPU Shader Compilation — Compiles array kernels directly to WGSL compute shaders.

mAPL Language Extensions

  • Native ES-style import and export module system with isolated namespaces.
  • Unambiguous dictionary literals ([ name: 'APL', score: 100 ]), destructuring, and zero-overhead ⎕JSON.
  • Gradual runtime type and shape contracts ({ :: num[] → num[] ⋄ ... }) enabling unboxed Real1D VM specialization.
  • Left-to-right triangle pipelines (▷), optional chaining (?.), and nullish coalescing (??).