extism/js-sdk

Add Observe SDK support

Opened this issue · 2 comments

bhelx commented

This is different than extism/extism#470

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

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

In order to accomplish this, we need to:

  • 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?)