ruvnet/ruflo · error

[WASM Loader] parse_toml failed, using fallback:

Error message

[WASM Loader] parse_toml failed, using fallback:

What it means

Log warning in parseFormula: the WASM parse_toml call (or its JSON result parse) threw, so the formula is parsed with the JavaScript fallback parser instead; the failure reason is logged.

Source

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

  const cached = formulaParseCache.get(cacheKey);
  if (cached) {
    recordTiming('parseFormula:cache-hit', startTime, false);
    return cached;
  }

  // Use batch deduplication for concurrent requests
  return parseDedup.dedupe(cacheKey, async () => {
    const wasmModule = await loadFormulaWasm();

    if (wasmModule) {
      try {
        const resultJson = wasmModule.parse_toml(content);
        const result = JSON.parse(resultJson) as Formula;
        formulaParseCache.set(cacheKey, result);
        recordTiming('parseFormula', startTime, true);
        return result;
      } catch (error) {
        console.warn('[WASM Loader] parse_toml failed, using fallback:', error);
      }
    }

    // JavaScript fallback
    const result = parseTomlFallback(content);
    formulaParseCache.set(cacheKey, result);
    recordTiming('parseFormula', startTime, false);
    return result;
  });
}

/**
 * Cook a formula by substituting variables.
 * Uses WASM if available (352x faster), falls back to JavaScript.
 *
 * @param formula - Formula to cook
 * @param vars - Variables to substitute
 * @returns Cooked formula with variables substituted

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Check the TOML input and the WASM parse error; the JS fallback parser is used — fix malformed TOML or rebuild the WASM module.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/plugins/gastown-bridge/src/wasm-loader.ts:802 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/92439fd05b925345. Report an issue: GitHub.