[Webkit-unassigned] [Bug 283054] New: Support JSPI
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 13 07:55:37 PST 2024
https://bugs.webkit.org/show_bug.cgi?id=283054
Bug ID: 283054
Summary: Support JSPI
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebAssembly
Assignee: webkit-unassigned at lists.webkit.org
Reporter: adam.zielinski at automattic.com
I'm a WordPress core committer sponsored by Automattic to work on WordPress Playground [1] – a version of WordPress that runs in browsers, CLI, etc. via WebAssembly.
JSPI support in WebKit would be supremely helpful in making WordPress Playground stable for Safari users.
Right now, Playground runs feature detection to ship a JSPI build of PHP.wasm to supporting browsers, and an Asyncify build otherwise.
In Chrome and Firefox, the JSPI version of Playground just works. In Safari, the Asyncify version of Playground is unreliable [2]. By design, Asyncify crashes whenever an asynchronous call is made and any of the call stack functions wasn't explicitly in the build arguments. PHP is a complex programming language interpreter and we haven't found an easy way of detecting all the relevant code paths, and listing all the available functions adds significant overhead both in terms of speed and a bundle size. The bug reports we receive require significant effort to address. As a result, we're only fixing the most problematic Asyncify issues and waiting for JSPI support in WebKit to remove the Asyncify build entirely.
Playground is becoming an important part of the WordPress ecosystem. It makes WordPress setup as easy as clicking a button, it enables using WordPress inside other applications, and it's been used by hundreds of thousands of people in the WordPress community.
Personally, I hope to eventually ship an "Export Site" feature that would download a single executable, e.g. via Bun [3]. However, Bun uses the same JavaScript engine as WebKit which means today it could only run the Asyncify build. This means we can either wait for the JSPI support or explore other JavaScript engines.
[1] https://w.org/playground
[2] https://github.com/WordPress/wordpress-playground/blob/8dfeea161742f3f94b18729fa8870e6314786f51/packages/docs/site/docs/developers/23-architecture/07-wasm-asyncify.md#asyncify-crashes
[3] https://bun.sh/docs/bundler/executables
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241113/1b4d3ed1/attachment.htm>
More information about the webkit-unassigned
mailing list