-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[browser] loader ES6 module #85730
[browser] loader ES6 module #85730
Conversation
Tagging subscribers to 'arch-wasm': @lewing Issue Detailswip
|
f1cded4
to
cac6aef
Compare
…nd native js files, remove it from loader js
# Conflicts: # src/mono/wasm/runtime/jiterpreter-trace-generator.ts
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run runtime-wasm |
WBT fails with All other CI failures are known. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
/** | ||
* query string to be used for asset loading | ||
*/ | ||
assetUniqueQuery?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the benefit over WebAssemblyStartOptions.loadBootResource
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could unify those later. Right now, the loadBootResource
is not there for non-blazor templates.
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
Show resolved
Hide resolved
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/ComputeWasmPublishAssets.cs
Outdated
Show resolved
Hide resolved
src/tasks/Microsoft.NET.Sdk.WebAssembly.Pack.Tasks/GenerateWasmBootJson.cs
Outdated
Show resolved
Hide resolved
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
This appears to have caused a massive regression in jsimport/export in browserbench? |
Split the
dotnet.js
into 3 ES6 modules.dotnet.js
src\mono\wasm\runtime\loader\
foldermono-config.json
orboot.config.json
dotnet.runtime.js
anddotnet.nativejs
by looking at theconfig.assets
dotnet.runtime.js
src\mono\wasm\runtime\
folder except/loader
folderdotnet.native.js
dotnet.native.wasm
,dotnet.native.symbols.js
,dotnet.native.worker.js
dotnet.native
is the new prefix name.future benefits
dotnet.js
. The loader would not change on re-link with workload.Other changes
assetUniqueQuery
which is appended to asset names (so that we could have multiple instances of ES6 modules)loaderHelpers
is similar toruntimeHelpers
but is populated by "loader". It passes methods and state between modules.find_corlib_class
andfind_class_in_assembly
would not always throw when they don't find the class.js-module-runtime
,js-module-dotnet
,js-module-native
Module.imports
functionality, droppedDotnetModuleConfigImports
MONO.mono_wasm_load_config
from legacy APIrequire
polyfill on NodeJSlocateFile
polyfillcreateEmscripten
is worth reviewSelfContained
dotnet.native.worker.js
now loadsdotnet.js
loader first