@perspective-dev/client
    Preparing search index...

    Function init_server

    • Register the Perspective engine ("server") WebAssembly binary that backs worker().

      The single-argument form registers one binary of either bitness. The object form registers a wasm32 and/or wasm64 (Memory64) binary; the wasm64 binary is preferred whenever the host supports Memory64, raising the engine's heap ceiling from 4GB to 16GB (at some engine performance cost — register only wasm32 to opt out). Sources registered as thunks are only invoked if selected, so the losing binary is never downloaded; if the selected wasm64 source fails to load and a wasm32 source is also registered, selection falls back to wasm32 with a console warning.

      Selection and download are deferred to the first worker() call.

      Examples

      perspective.init_server(
      fetch("perspective-server.wasm"),
      );

      perspective.init_server({
      wasm32: () => fetch("perspective-server.wasm"),
      wasm64: () => fetch("perspective-server.memory64.wasm"),
      });

      Parameters

      Returns void