Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
wasm-bindgen ≥ 0.2.102has a breaking change for how import names for some intrinsics, including__wbindgen_throw, are generated: wasm-bindgen/wasm-bindgen#4636.Plaid only export
__wbindgen_throwfor the place holder module so WASM binaries compiled withwasm-bindgen ≥ 0.2.102will not be able to resolve their mangled__wbindgen_throw.__wbindgen_externref_table_grow,__wbindgen_externref_table_set_null,__wbindgen_describeare not affected as they are still declared as raw extern imports:Note that the mangled names for these intrinsics are not necessarily stable
≥ 0.2.102:wasm-bindgen ≤ 0.2.101:__wbindgen_throw0.2.102 ≤ wasm-bindgen ≤ 0.2.104:__wbg_wbindgenthrow_{hash}wasm-bindgen ≥ 0.2.105:__wbg___wbindgen_throw_{hash}One can check the current mangling format by looking at test files, such as https://github.com/wasm-bindgen/wasm-bindgen/blob/main/crates/cli/tests/reference/anyref-import-catch.wat and https://github.com/wasm-bindgen/wasm-bindgen/blob/main/crates/cli/tests/reference/anyref-import-catch.bg.js.
Fix
link_functions_to_modulenow also skips function names matching new mangled name formats of intrinsic functions.create_bindgen_placeholdernow exportfake_wbindgen_throwif it detects new names for__wbindgen_throw.