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

Crate is not supported in web workers due to js-snippets usage #13

Closed
Zageron opened this issue Oct 13, 2022 · 2 comments · Fixed by #14
Closed

Crate is not supported in web workers due to js-snippets usage #13

Zageron opened this issue Oct 13, 2022 · 2 comments · Fixed by #14
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Zageron
Copy link

Zageron commented Oct 13, 2022

https://rustwasm.github.io/docs/wasm-bindgen/reference/js-snippets.html

Any way you'd be able to remove reliance on js-snippets?

@Zageron Zageron changed the title Sadly crate is not supported in web workers Crate is not supported in web workers Oct 13, 2022
@Zageron Zageron changed the title Crate is not supported in web workers Crate is not supported in web workers due to js-snippets usage Oct 13, 2022
@MattiasBuelens
Copy link
Owner

Thanks for reporting!

It looks like there's only a single usage of JavaScript snippets:

#[wasm_bindgen(inline_js = "export function bytes_literal() { return \"bytes\"; }")]
extern "C" {
fn bytes_literal() -> JsValue;
}

This was used to work around a bug in Chrome when they first shipped readable byte streams, see 67bb2a4. Fortunately, that bug has since been fixed, so I think it's time to remove the workaround. I'll get to it! 🙂

@MattiasBuelens MattiasBuelens self-assigned this Oct 15, 2022
@MattiasBuelens MattiasBuelens added the bug Something isn't working label Oct 15, 2022
@MattiasBuelens MattiasBuelens added this to the v0.3.0 milestone Oct 15, 2022
@Zageron
Copy link
Author

Zageron commented Oct 15, 2022

Thanks very much. @MattiasBuelens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants