extism/js-sdk

Allow Initialization of Plugin from WebAssembly.Module

Closed this issue · 1 comments

This was done in the "legacy" browser SDK here: extism/extism@e1a5b01

It allows Extism to be used in a wider variety of contexts (such as Cloudflare workers)

This should be pretty straightforward:

  • in src/interfaces.ts: Add a new ManifestWasmModule, patterned after the existing interfaces, then add it to the ManifestWasm union type.
  • Somewhat trickier: changing the signature of toWasmModuleData in src/manifest.ts. Instead of stopping the resolution of manifest input at array buffers, it should use those arraybuffers to create modules via WebAssembly.compile.