Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125657 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 66FCF1A00BD for ; Mon, 23 Sep 2024 20:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1727122288; bh=P9Xoz0Zzg4Qf/uSiBSQGlbketzTUxf/AzOGOf0ljYrw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=D7IeU/rlHQW29U3M0yJAdboYI6ZD60ZkLI9GsunNIdoaTNg6o1+PIBXEisczDAaIO NmMk1WCn+uN4++60iqb3mSchvB1irryB1mkrLrQ5TpBtcPskZ1XLhqhmhoe/Rve1zS K8fChM/p6fv24X0JaK6u3GIndOnEEYzCqYtt+OHVKzJNKxVcAgxeW3CE9nJvKfrQoz 0MncfguCHHwjAMAGa0ugp3ooi0zPVp/QirKg+RaZIYGG21RyoAK2HfMFAkO1SOd8hj HnZHOyXTHebgC7cfsK5rXEPwVnTjQ8DHE+5dbaO//cM0Fbl6jxDuSilBDM/aB5x1fK /alr47Z5EvclQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C49A018006D for ; Mon, 23 Sep 2024 20:11:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 23 Sep 2024 20:11:27 +0000 (UTC) Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.phl.internal (Postfix) with ESMTP id E111A138029D for ; Mon, 23 Sep 2024 16:09:17 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Mon, 23 Sep 2024 16:09:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1727122157; x=1727208557; bh=Z475xm99Dl fiiC4+qK+htdoN+DFxccgmUKIN1XgP/+U=; b=dP7cJGKou2u3DK+/HfgMhKR82B KK6UjERWU9iIY4aPchoQEptTd7mWtnMVl1lpUUZ5gLsMAAEP2oRI6KbhJe/iZ5eY mXQWRj5QlqpDgmrIRXi3DTN08zkHkB6osx/kHaHEw8L0aKPk50oDZ/QKkl9d4CST h48+8+2jtQ6P58YSF3uwV6/fT6PmwWVe3Bb9hgBr2DC18mfmCBiJz4MaWwJ+Ukyj GWXkmyAH45JxL2j8tCZjaGzDjTQ55ainck8ba4au3jk4k9lEU+8eJoyLedp3hNft a6Nfn4x/f4bNZU+vipRCeJRJLc9lx4j6naLedPiyVRzXVPJFiPJLh4A2afdA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1727122157; x=1727208557; bh=Z475xm99DlfiiC4+qK+htdoN+DFx ccgmUKIN1XgP/+U=; b=n0QoDAxX2iycgeSQS9fZPOThMvAmUTb2ItyYvc/agc71 nCtUrINnXZ0lDqYjCx2GHmKi7/tkXRlXOt6eGHPxIM05kriUp4C+kbGWtIrHYRmC FOhinQns4B0YgMneA2qDzXqO5roSgjc9b9v4JLKP4Fr1LNPnXQfo18/zslwCFHJH x8oLNt8KYod7cWMPTdZZwF1Edgauz/ul3N5EIeS9X/RnQzd9ypFpP+d3fsLM79Zl uMqISXx1UKD+RF16WF4ZNSxc3rTBbaiHgSvKI998ZIv3i6v6gN11Ee4M//qQbWf6 BueOxxtJCL1IHi4nZVXHfhITS1lrkv5HNHaWXyHzqA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudelledgudegjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurheptgfkff ggfgfuvfhfhfgjsegrtderredtvdejnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhn shculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenuc ggtffrrghtthgvrhhnpeehteelieeigfeuudeiueeiffdvveehudeufeekjeeugffffedt iedtgeettdelteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthhtohep uddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslhhish htshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 23 Sep 2024 16:09:17 -0400 (EDT) Content-Type: multipart/alternative; boundary="------------OsTqEx90mzS3pFbWZo5DqPqn" Message-ID: Date: Mon, 23 Sep 2024 21:09:15 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV] Zephir, and other tangents To: internals@lists.php.net References: <8D420123-4ECF-48FD-A9C3-F80C60457A37@newclarity.net> <7EA884D2-0F37-4BF1-AC97-DB6953C944E6@automattic.com> <042AF6B3-ACAD-498E-99FA-CD7EDE8778FC@newclarity.net> Content-Language: en-GB In-Reply-To: From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") This is a multi-part message in MIME format. --------------OsTqEx90mzS3pFbWZo5DqPqn Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 23/09/2024 18:07, Adam Zielinski wrote: > If PHP had WASM support, > WordPress could ship curl.wasm as a fallback and focus on the product > more than on the plumbing. As has been pointed out a couple of times already, this particular use case really doesn't stand up to scrutiny. - The chances of PHP making it a requirement that everybody who installs the PHP runtime *must* also install a WASM runtime are close to zero. It's actually much more plausible (though still unlikely) that we would make libcurl a hard requirement. - Hosts who do not install ext/curl because they don't trust it are very unlikely to trust something as complex and versatile as a WASM runtime. - Hosts who do not install ext/curl because they only install the base package provided by Ubuntu/RedHat/Alpine/etc won't install an ext/wasm, because it won't be included in that base package. I can't stress enough that those base packages are not "the default build of php-src", they are entirely controlled by the package managers at each distribution/repository. - Hosts who already install a variety of PHP extensions will already install ext/curl, so are not relevant *for this particular example*. The use case I *can* see is for *high-end* hosting services, who already install a range of extensions, including ext/curl, but don't allow users to upload binaries. (Mike gave the example of Pantheon.) They might allow users to upload and run more niche extensions, if it was proven that WASM provided a better sandbox than just running binary code inside an OS container. I don't actually know what market share that kind of service has, with cheaper shared hosts on one side, and container-based hosting like DigitalOcean (where you can upload native binaries already) on the other. Regards, -- Rowan Tommins [IMSoP] --------------OsTqEx90mzS3pFbWZo5DqPqn Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 23/09/2024 18:07, Adam Zielinski wrote:
If PHP had WASM support,
WordPress could ship curl.wasm as a fallback and focus on the product
more than on the plumbing.


As has been pointed out a couple of times already, this particular use case really doesn't stand up to scrutiny.

- The chances of PHP making it a requirement that everybody who installs the PHP runtime *must* also install a WASM runtime are close to zero. It's actually much more plausible (though still unlikely) that we would make libcurl a hard requirement.
- Hosts who do not install ext/curl because they don't trust it are very unlikely to trust something as complex and versatile as a WASM runtime.
- Hosts who do not install ext/curl because they only install the base package provided by Ubuntu/RedHat/Alpine/etc won't install an ext/wasm, because it won't be included in that base package. I can't stress enough that those base packages are not "the default build of php-src", they are entirely controlled by the package managers at each distribution/repository.
- Hosts who already install a variety of PHP extensions will already install ext/curl, so are not relevant *for this particular example*.


The use case I *can* see is for *high-end* hosting services, who already install a range of extensions, including ext/curl, but don't allow users to upload binaries. (Mike gave the example of Pantheon.) They might allow users to upload and run more niche extensions, if it was proven that WASM provided a better sandbox than just running binary code inside an OS container. 

I don't actually know what market share that kind of service has, with cheaper shared hosts on one side, and container-based hosting like DigitalOcean (where you can upload native binaries already) on the other.


Regards,

-- 
Rowan Tommins
[IMSoP]
--------------OsTqEx90mzS3pFbWZo5DqPqn--