-
Hi Grain devs, I absolutely love this language, and am looking to spend a lot of time working with it. I want to do stuff with Grain as a worker in the browser, but it's not clear if I'm able to use postMessage and such. I think you would be able to use wasi's socket functions like sock_recv perhaps, but I cant seem to find any reference to that or anything. Thanks for making Grain, it's actually really good. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @juls0730, that's great to hear. Using WASI sockets for I'm happy to help you figure it out and get that working—let's make this a discussion instead. |
Beta Was this translation helpful? Give feedback.
Hi @juls0730, that's great to hear. Using WASI sockets for
postMessage
seems a little overkill for this type of thing—you'd have to wire up messages to get forwarded to the wasm code anyway, so you might as well just receive the message in your worker and just call one of the module's exports. You'll have a much easier time.I'm happy to help you figure it out and get that working—let's make this a discussion instead.