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. Docs
  3. Simulation Core

Simulation Core

Architecture of the Rust simulation engine

February 4, 2026
Edit

Simulation Core

The simulation engine is written in Rust and compiles to both native binaries and WebAssembly for browser execution.

Architecture Overview

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

flowchart LR subgraph Input Config[Configuration] Rotation[Rotation] Data[Game Data] end subgraph Engine Sim[Simulation Loop] Events[Event Queue] State[Combat State] end subgraph Output Metrics[Metrics] Timeline[Timeline] end Config --> Sim Rotation --> Sim Data --> Sim Sim --> Events Events --> State State --> Sim Sim --> Metrics Sim --> Timeline

Core Components

ComponentResponsibility
ConfigurationCharacter stats, talents, gear, encounter parameters
RotationPriority list defining ability usage
Game DataSpell definitions, coefficients, scaling formulas
Event QueuePriority queue of pending game events
Combat StateCurrent buffs, debuffs, resources, cooldowns
MetricsDPS, resource usage, ability breakdowns

Determinism

The engine produces identical results given identical inputs:

  • Seeded random number generator for all stochastic events
  • Deterministic floating-point operations
  • Sorted iteration over collections
  • No dependency on system time or external state

This enables distributed simulation where chunks can be processed by any node and results aggregated reliably.

WASM Integration

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident.

The engine compiles to WebAssembly using wasm-pack:

bash
cd crates/engine
wasm-pack build --target web --out-dir ../../packages/wowlab-engine/wasm

The generated WASM module is loaded asynchronously in the browser and provides the same API as the native binary.

Next steps

Combat Mechanics
Design Principles
Combat Mechanics

Navigation

Introduction

Overview

Engine

Simulation CoreCombat Mechanics

Networking

Meta

On this page

Simulation CoreArchitecture OverviewCore ComponentsDeterminismWASM Integration