extism / js-sdk

Run Extism WebAssembly plug-ins / functions from JavaScript (supports major browsers, Node.js, Deno, Bun, and Cloudflare Workers)
https://extism.github.io/js-sdk/
BSD 3-Clause "New" or "Revised" License
65 stars 10 forks source link

API design notes #6

Closed chrisdickinson closed 1 year ago

chrisdickinson commented 1 year ago

@bhelx asked me to take a quick look at the API to see how it maps to JS idioms. This is the result of a quick look – so there's probably stuff I've misunderstood about the implementation, apologies! I'd be happy to talk about any of these items more (or pitch in myself!)

mhmd-azeez commented 1 year ago

@chrisdickinson thank you very much for the thorough review

that synchronous httpRequest is a killer for prod use; we should think about running the plugin in a Worker so we avoid gumming up the main thread

Yup, I agree. Unfortunately, I wasn't able to find any non-blocking ways. Your help would be greatly appreciated.

chrisdickinson commented 1 year ago

Great work on this – I'm closing this as complete, with work to continue in #7!