On Tue, 17 Sep 2024, at 22:03, Rob Landers wrote: > It seems like you have a use for it though, and I’m reasonably certain you > could get it working over ffi in a few weeks; yet you mention hosts not even > having the curl extension installed, so I doubt that even if wasm came to be, > it would be available on those hosts.
I just want to highlight this point, and clear up some possible misconceptions. PHP is a modular application, built out of a core engine and any number of "extensions". About 60 extensions are in the php-src repository's ext/ folder. This mostly just means that they are released on the same schedule as PHP, and some simple maintenance tasks are carried out in bulk across them. It also makes it slightly more likely that package managers will include packages for them, but this is not a hard rule - e.g. Ubuntu ships packages for many common PECL and externally-hosted extensions like DS and MongoDB. A very small number of extensions are "always available" - you can't build PHP without them. These need to be usable on every platform PHP can be built for, and any external dependencies are generally copied into the php-src repository, rather than increasing the base requirements to build or run a minimal PHP. I'm pretty confident that an integration of WASM would be a new extension, and it would be optional. So a cheap host that does not enable something as well-known and long-established as ext/curl is extremely unlikely to enable an "ext/wasm". A slightly more knowledgeable host *might* be willing to enable an "ext/wasm", but not allow a user to upload their own extensions or enable ext/ffi - but only once it had been proven stable and secure.. It appears there are already a couple of projects building WASM extensions. I would urge those of you interested to collaborate on one of those projects. The only reason to raise an RFC would be a) if the extension needed some non-trivial change to the core engine to hook into; or b) if the extension was mature, and it seemed beneficial to move it into the php-src repository rather than releasing it separately. Regards, -- Rowan Tommins [IMSoP]