ruvnet/ruflo · error · Error

WASM not available

Error message

WASM not available

What it means

The gastown-formula WASM module is unavailable — wasmAvailable is false (module not installed, failed to load, or platform unsupported) and something required the native path. Operations needing the WASM exports cannot run; use the JS fallback or install the module.

Source

Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:125

// ============================================================================
// Module Cache - Lazy Loading with LazyWasm
// ============================================================================

/** WASM availability flag */
let wasmAvailable: boolean | null = null;
/** Performance timings log */
const performanceLog: PerformanceTiming[] = [];

/**
 * Lazy loader for gastown-formula-wasm module.
 * Only loads WASM when first accessed, not during startup.
 * Supports idle timeout for memory cleanup.
 */
const lazyFormulaWasm = new LazyWasm<FormulaWasmExports>(
  async () => {
    if (!isWasmAvailable()) {
      throw new Error('WASM not available');
    }
    const module = await import('gastown-formula-wasm') as unknown as FormulaWasmExports;
    if (typeof module.default === 'function') {
      await module.default();
    }
    return module;
  },
  {
    name: 'gastown-formula-wasm',
    idleTimeout: 5 * 60 * 1000, // 5 minutes idle timeout for memory cleanup
    onError: (error) => {
      console.debug('[WASM Loader] gastown-formula-wasm load error:', error);
    },
  }
);

/**
 * Lazy loader for ruvector-gnn-wasm module.

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Ensure the module/bridge/plugin initialize() method has been called and awaited before invoking this operation.
  2. Guard against calls made during startup: await the initialization promise or check the initialized flag and fail fast with a clear setup hint.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:125 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/4d66055ac0153eb5. Report an issue: GitHub.