You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calls out to modules with wasm-opt's --asyncify pass to unwind and rewind the module's call stack when we want to put Swift execution to sleep while allowing incoming events to be handled by JavaScript.
This adds a bit of complexity on the JS runtime side, especially the need to provide a 'restart' method for re-entering module execution. Should not affect existing usage as all additions are optional.
At Swift build time, there is no way of knowing if module will be asyncified so no way to block usage of new methods. The Asyncify pass is extremely slow as well, so not a good candidate to add e.g. to carton's build process.
What this adds
Calls out to modules with
wasm-opt
's--asyncify
pass to unwind and rewind the module's call stack when we want to put Swift execution to sleep while allowing incoming events to be handled by JavaScript.Further Reading
Alon Zakai's Blog
Alon Zakai's Talk
Binaryen Docs
Experimental JS wrapper from Google
Concerns
Originally posted by @yonihemi in swiftwasm/JavaScriptKit#107
The text was updated successfully, but these errors were encountered: