Replies: 7 comments 1 reply
-
👋 Thank you for your report! It would be really great to run Wasm Workers Server in the browser! Wasm Workers Server at this time is a developer-focused tool that will look for Wasm Modules and supported languages extensions in the filesystem, and will serve these functions in HTTP endpoints created on the fly. There are many ways in which we could map Wasm Workers Server to the browser, but we would like to understand your use case a bit better. How do you expect to use Wasm Workers Server on the browser? Can you share some use cases with us, and how would you expect them to work? Thank you :) |
Beta Was this translation helpful? Give feedback.
-
I am also interested in this. here is my thinking and an basic example that someone else has done: https://github.com/stackus/todos-htmx-wasm The bowsers have web workers and so we need a way for the main browser window to late load the wasm in the web worker and use Post Message as the “bus”. So the main js makes a request to a wasm worker. The base system proxy ( service worker ) then requests the wasm ( not wasi ) from the server ( and caches it) and returns it to the web worker proxy. The web worker proxy executes the wasm and returns the result over Post Message to the js main window. The next call will be much faster. This combined with htmx pattern is very powerful because you can progressively render your gui merging in the html. So the wasm can not just return json to the main js but actual html. The bus abstraction is the first thing needed so that you can use the architect for wasi and wasm. |
Beta Was this translation helpful? Give feedback.
-
https://wintercg.org/faq Is also designed for the goal of running your wasm in a browser or server. as I understand it this repo is aligned with that goal too ? |
Beta Was this translation helpful? Give feedback.
-
https://github.com/vmware-labs/wasm-workers-server/tree/main/kits/go/worker Uses stdIn / stdout so it makes the creation of the bus to run inside a browser easier but just creating a bus that can run in a browser too that abstracts away the Post Message implementation |
Beta Was this translation helpful? Give feedback.
-
EDIT: I found I can convert an issue to discussion directly 🤦. Sorry for the noise!
|
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
If we can run the wasm workers server in browser, we can run it anywhere.
Describe the solution you'd like
we know the browser (chrome)have Wasm runtime
Describe alternatives you've considered
No response
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions