WoW Lab

WoW Lab

Toolkit

Simulate

Quick SimBest in BagsDrop Optimizer

Rotations

BrowseNew Rotation

Plan

Traits
P

Developer

DocsBibleEngineHooksMCP ServerMetricsUI Showcase

Misc

AboutBlog

© 2025 WoW Lab

  1. Home
  2. Bible
  3. Rotation Language

Rotation Language

Why APL, what scripting languages were tried, and the road to JIT compilation

February 13, 2026
Edit

The rotation language problem: users need to express complex priority-based decision logic (if cooldown ready and buff active and resource > 50 then cast X), it must be evaluable millions of times per simulation, it must be authorable by non-programmers, it must be validatable before execution, it must be serializable for storage and sharing.

Scripting languages tried and why they failed: Lua (embedding overhead, sandbox escapes, GC pressure in hot loop, poor WASM story), Rhai (too slow for millions of evaluations per second, dynamic typing overhead), custom interpreted DSL (still too slow, interpretation overhead dominates at scale), expression trees with eval (better but still branch-heavy).

Why APL (Action Priority List): simple mental model (ordered list of conditions → actions), natural fit for WoW combat (priority-based not scripted), established convention from SimulationCraft, flat structure maps well to UI (drag-drop reordering, condition editors).

The JIT solution: JSON AST → Cranelift IR → native machine code, ~3ns per evaluation vs ~300ns interpreted, eliminates branch prediction misses, compiles once per simulation run, schema validation catches errors before compilation, same JSON format stored in database and evaluated in engine, WASM fallback for browser-side validation (no JIT, tree-walk interpreter).

Roads not taken: full scripting language (too complex for users, security concerns), visual node graph (Unreal Blueprint-style, too heavyweight), SimC APL text format (parsing fragility, no structured editing).

Next steps

Combat Formulas
Language Evaluation
Combat Formulas

Navigation

IntroductionGlossaryReferences

Overview

MotivationArchitectureLanguage EvaluationRotation Language

Mechanics

Game Data

Simulation

Infrastructure

Portal