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

Get rid of the circular dependency when targeting ES modules #3152

Merged
merged 3 commits into from
Nov 17, 2022

Conversation

Liamolucko
Copy link
Collaborator

Fixes #3102
Fixes #3149

I've changed the *_bg.js file to not import from the wasm module, eliminating the circular dependency between them.

It begins with an undefined let wasm which gets initialized by the user-facing JS file before calling __wbindgen_start, by calling an exported function __wbg_set_wasm that sets wasm.

Fixes rustwasm#3102
Fixes rustwasm#3149

I've changed the `*_bg.js` file to not import from the wasm module, eliminating the circular dependency between them.

It begins with an undefined `let wasm` which gets initialized by the user-facing JS file before calling `__wbindgen_start`, by calling an exported function `__wbg_set_wasm` that sets `wasm`.
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

Successfully merging this pull request may close these issues.

js-sys Math::random() will interrupt program Revisiting Circular Dependency Bugs
2 participants