extism / js-pdk

Write Extism plugins in JavaScript & TypeScript
42 stars 17 forks source link

consider making resulting modules `reactor` modules #72

Open zshipko opened 1 month ago

zshipko commented 1 month ago

Running a js-pdk plugin with extism-wamr gives a warning:

[15:03:41:772 - 7F54D39B9740]: warning: a module with WASI apis should be either a command or a reactor

We may want to add an _initialize export to fulfill this expectation

bhelx commented 2 weeks ago

Can we just add this as an export to the core crate? What do we need to do to accomplish this?

zshipko commented 2 weeks ago

Yeah we could probably just add an empty _initialize function. The main blocker is just trying to understand how important this change really is. WAMR is the only runtime that has an issue with it, and even there it's just a warning.