js-sdk
js-sdk copied to clipboard
Add Observe SDK support
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.
Wait for Observe SDK breaking changes to land . Ping @chrisdickinson
In order to accomplish this, we need to:
- [x] Add a stage "between"
createPlugin -> plugin
andplugin.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 toWebAssembly.Module
instances. (IOW: this makes a strong case for starting on #9 before 1.0)
- This is semi-related to #9. Today, all manifest items are resolved to
- [ ] Add a plugin method for accessing
WebAssembly.Module.customSections()
for a sub-module of a plugin. - [ ] Maybe add a
PluginOptions
hook forpreinstantiate
so the observe-sdk can intercept the module's customdata / exports before the module is instantiated (& optionally add additional host functions?)