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

WebWorker as separate crate #8072

Closed
olanod opened this issue Oct 22, 2020 · 1 comment
Closed

WebWorker as separate crate #8072

olanod opened this issue Oct 22, 2020 · 1 comment
Labels
design limitation something that can't be fixed or is too hard to fix suggestion suggestions for new features (yet to be agreed)

Comments

@olanod
Copy link

olanod commented Oct 22, 2020

As mentioned in #7928 I'm creating a plugin system where JS/TS/WASM plugins are written using the WebWorker interface so they run unchanged in the browser or server. I know this can be done on top of deno-core but ideally deno exposes a crate that "installs" the required APIs to the JS runtime(I'm completely sure how it works but something like deno-fetch?), since this is pretty much done already on deno cli package I hope it wouldn't be a big trouble?

Some pointers on how to create this "webworker-rs" crate would be helpful, I'd like to get to the point where I just do something similar as with the browser let handler = WebWorker::new("plugin.js") and a ES modules based plugin is automagically loaded and everything just works. Of course even better would be a brave heart that jumps directly into creating this awesome crate 😅

@bartlomieju
Copy link
Member

Releasing WebWorker as a standalone op crate is very non-trivial and I expect it to be one of the last op crates to be produced, if ever.

The reason is that WebWorker is very tightly tied to abstractions in CLI, including, but not limiting to integration with event loop (tokio). I really don't see a straightforward way to move it into a separate crate.

I'm afraid at this point it's a "won't fix" so I'm going to close this issue in favor of #7928.

@kitsonk kitsonk added design limitation something that can't be fixed or is too hard to fix suggestion suggestions for new features (yet to be agreed) labels Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design limitation something that can't be fixed or is too hard to fix suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

3 participants