gloo icon indicating copy to clipboard operation
gloo copied to clipboard

Should we have a gloo-worker no-op mode for desktop apps?

Open gilescope opened this issue 2 years ago • 1 comments

As we move towards 'wasm-first development', I'm wondering if gloo-worker could have a NoOp mode that would work on desktop. I.e. skip the serialisation and just pass the messages in-process. The rational is that once you've got things working for the web, you don't really want to have to re-architect your app to work on desktop. Ideally one could just flip a feature and gloo-worker go into no-op mode and run it all in process. Presumably in this mode it would be able to ditch most dependencies...?

We could create a not-gloo-worker crate and rename it so that the types matched, but that seems less elegant.

gilescope avatar Aug 28 '22 07:08 gilescope

I don't think that is the right solution. gloo-worker is meant to be used to interact with Web Workers.

For your case, you can have a wrapper crate in your project that chooses between the two as needed.

ranile avatar Nov 03 '22 14:11 ranile