[browser] bind JS methods to minified WASM imports#90145
[browser] bind JS methods to minified WASM imports#90145pavelsavara merged 9 commits intodotnet:mainfrom
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsStep one
Step two (actual fix)
Discussion
Fix #90111
|
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I really don't like the order mattering |
Why not ? What do you propose ? |
It adds an easy place for very confusing failures to creep in. But I don't completely understand why it needs to be this way |
|
We have more options, I think
|
|
Thanks, out of your options:
all three of those sound fine to me |
Selected the automation, because maintaining both lists was dummy chore already anyway. Now it could only confuse indexes if you mismatched versions of |
kg
left a comment
There was a problem hiding this comment.
The reliance on Function.name might bite us someday - add a check to make sure there are no name collisions, because a name collision could trigger an overwrite if I understand this right - but I like this solution
|
with this change:
The When both |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
I see #86387 failure on CI |
…ash and warn if they don't match
|
Both CI failures are unrelated |
Step one
replace_linker_placeholdersmoved toexports-binding.tsfilereplace_linker_placeholdersnow returns array, not object with function namesdotnet.runtime.jssize a bit (222629->221446 uncompressed)rollup.config.jswill executeexports-linker.tsin process to extract function names to indexes mapingwasm.projwill append the json to the end ofdotnet.es6.lib.jsdotnet.es6.lib.jswill generate stubs which return it's indexStep two (actual fix)
replace_linker_placeholderswill call all stubs in order to create mapping from (minified) import name to index in thedotnet.runtime.jsmodule exportsOther
Discussion
{runtime_idx:1}which would throw, if called from WASMFix #90111