extism / js-pdk

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

refactor: allow more flexibility in the types of imports/exports #48

Closed zshipko closed 4 months ago

zshipko commented 4 months ago
nilslice commented 4 months ago

Awesome work. I've tested this using a Go plugin to call a JS export as a host function and it works great.

I will do more testing with it tonight.. curious if you have any specific paths that you'd like me to focus on?

zshipko commented 4 months ago

Thanks for taking a look!

curious if you have any specific paths that you'd like me to focus on?

I think just testing it out is the most helpful

One future improvement worth calling out is the ability to use types like string or object in the d.ts file, which would automatically get converted from an I64 parameter/result. I have started working on that, but it complicates things a little bit so it seems better to get these changes in first.

nilslice commented 4 months ago

One future improvement worth calling out is the ability to use types like string or object in the d.ts file, which would automatically get converted from an I64 parameter/result. I have started working on that, but it complicates things a little bit so it seems better to get these changes in first.

This sounds nice!!