js-sdk icon indicating copy to clipboard operation
js-sdk copied to clipboard

Add Observe SDK support

Open bhelx opened this issue 10 months ago • 2 comments

This is different than https://github.com/extism/extism/issues/470

Because we don't rely on libextism in this library, I believe we should be able to add Observe support independently.

bhelx avatar Sep 19 '23 16:09 bhelx

Wait for Observe SDK breaking changes to land . Ping @chrisdickinson

neuronicnobody avatar Oct 10 '23 19:10 neuronicnobody

In order to accomplish this, we need to:

  • [x] Add a stage "between" createPlugin -> plugin and plugin.call() where the module is compiled but not instantiated
    • This is semi-related to #9. Today, all manifest items are resolved to ArrayBuffer bytes, but both #9 and this work mean we'll want to resolve manifest items down to WebAssembly.Module instances. (IOW: this makes a strong case for starting on #9 before 1.0)
  • [ ] Add a plugin method for accessing WebAssembly.Module.customSections() for a sub-module of a plugin.
  • [ ] Maybe add a PluginOptions hook for preinstantiate so the observe-sdk can intercept the module's customdata / exports before the module is instantiated (& optionally add additional host functions?)

chrisdickinson avatar Nov 16 '23 20:11 chrisdickinson