spin icon indicating copy to clipboard operation
spin copied to clipboard

running spin application directly in the broswer?

Open archywillhe opened this issue 1 year ago • 2 comments

Can we do that with wasm runtime like wasmer? Or does spin has an in-broswer run-time ?

I was checking out WebContainer and noticed it was able to run node in the browser.. just wondering if someday we can run a Spin server in the browser too.. that will be super cool! thanks

archywillhe avatar Jan 10 '24 21:01 archywillhe

I imagine this would take significant design effort, but my predictive powers would also have ruled out "containers in the browser" and "compile containers to Wasm", both of which have already happened. grin There are certainly design challenges though, and I will chance my arm and say it's unlikely to happen anytime soon.

(Now watch Radu do it in a weekend.)

I am curious about your use case though - what sort of Spin application are you thinking of where you'd like to have the server (or other event handler) running in the browser, rather than at the command line?

itowlson avatar Jan 16 '24 02:01 itowlson

FWIW I have had success with simple experiments running spin components in the browser using JCO and writing shim for the spin host functions.

karthik2804 avatar Jan 22 '24 05:01 karthik2804