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

[wasm] preparation for module encapsulation #60928

Merged
merged 2 commits into from
Oct 29, 2021

Conversation

pavelsavara
Copy link
Member

  • simplified fetch and script loading logic/polyfil
  • clarified runtime-test.js based on Daniel's draft.
  • extracted mono_wasm_invoke_js and mono_wasm_compile_function out of C macro into proper .ts function
  • wrapped access to API via globalThis with warning on first use
  • added cwraps.mono_wasm_add_assembly and cwraps.mono_wasm_load_runtime which Blazor uses
  • fixed closures for generated functions, so that they don't use global Module reference
  • mono_wasm_invoke_js now uses new Function instead of eval()
  • removed deprecated Blazor functions

@ghost
Copy link

ghost commented Oct 27, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details
  • simplified fetch and script loading logic/polyfil
  • clarified runtime-test.js based on Daniel's draft.
  • extracted mono_wasm_invoke_js and mono_wasm_compile_function out of C macro into proper .ts function
  • wrapped access to API via globalThis with warning on first use
  • added cwraps.mono_wasm_add_assembly and cwraps.mono_wasm_load_runtime which Blazor uses
  • fixed closures for generated functions, so that they don't use global Module reference
  • mono_wasm_invoke_js now uses new Function instead of eval()
  • removed deprecated Blazor functions
Author: pavelsavara
Assignees: -
Labels:

arch-wasm, area-System.Runtime.InteropServices.JavaScript

Milestone: 7.0.0

src/mono/wasm/runtime-test.js Show resolved Hide resolved
src/mono/wasm/runtime-test.js Outdated Show resolved Hide resolved
src/mono/wasm/runtime-test.js Outdated Show resolved Hide resolved
src/mono/wasm/runtime-test.js Outdated Show resolved Hide resolved
src/mono/wasm/runtime-test.js Show resolved Hide resolved
src/mono/wasm/runtime/method-calls.ts Show resolved Hide resolved
src/mono/wasm/runtime/method-calls.ts Outdated Show resolved Hide resolved
- clarified runtime-test.js based on Daniel's draft.
- extracted mono_wasm_invoke_js and mono_wasm_compile_function out of C macro into proper .ts function
- wrapped access to API via globalThis with warning on first use
- added cwraps.mono_wasm_add_assembly and cwraps.mono_wasm_load_runtime which Blazor uses
- fixed closures for generated functions, so that they don't use global Module reference
- mono_wasm_invoke_js now uses new Function instead of eval()
- removed deprecated Blazor functions
- fixed lint issues
Co-authored-by: Daniel Genkin <[email protected]>
@pavelsavara pavelsavara merged commit 76e68db into dotnet:main Oct 29, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 28, 2021
@pavelsavara pavelsavara deleted the wasm_encapsulate_prep branch January 4, 2022 13:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants