Expand description
§Varpulis Engine WASM
Full VPL engine compiled to WebAssembly. Parse VPL programs, process events, and receive output events — all in the browser or any JS/TS runtime.
§Usage (JavaScript/TypeScript)
import { WasmEngine } from '@varpulis/engine';
const engine = new WasmEngine();
engine.load(`
event Sensor:
temperature: float
zone: str
stream Hot = Sensor
.where(temperature > 100)
.emit(zone: zone, temp: temperature)
`);
const outputs = engine.processEvent('{"event_type":"Sensor","temperature":150,"zone":"A"}');
// outputs: [{"stream":"Hot","event":{"zone":"A","temp":150},"timestamp":"..."}]Structs§
- Wasm
Engine - WASM-accessible VPL engine.