-
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
[wasm] proper startup sequence in dotnet.worker.js
#70891
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue Details
We could implement some post-link build step, which would append and prepend code to the emscripten's code in
|
Couple of things:
|
worker.js seems to only add settings.ENVIRONMENT_MAY_BE_NODE = not settings.ENVIRONMENT or 'node' in environments so we could omit |
Just want to add now that the #70746 ES6 PR is merged that So the things left to address are to make sure we initialize |
require
in dotnet.worker.js
@lambdageek I moved this to 8, please let me know if you think we need it in net7 |
require
in dotnet.worker.jsdotnet.worker.js
We compile
dotnet.worker.js
with-s EXPORT_ES6
, so it usedimport(uri).then(callback)
dynamic imports to bring in scripts.There is still a polyfill for Node in the worker JS file that uses
require
andeval
. It could be compiled out if we change the threaded build to not setnode
as an environment when we build for threading, seehttps://github.com/emscripten-core/emscripten/blob/6577be0d782368893b8d0c2dbaac3908fc425ef6/src/settings.js#L615-L640
Original issue
dotnet.worker.js
hasrequire
in it, which makes it not ES6 readyeval
in it which makes it CSP issueWe could implement some post-link build step, which would append and prepend code to the emscripten's code in
dotnet.worker.js4
Or we could just have our own version, which we would have to keep in sync with upstream.
The text was updated successfully, but these errors were encountered: