Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gilescope opened this issue Aug 28, 2022 · 1 comment
Open

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

gilescope opened this issue Aug 28, 2022 · 1 comment

Comments

@gilescope
Copy link

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.

@hamza1311
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants