Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125620 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 CD6FE1A00BD for ; Wed, 18 Sep 2024 11:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1726658290; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH+wGg26YPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Ttz6pOa574L+tdyUnJDK0af9nikZGt/AtaU6bej9AhRjvbkwotqsSdcRahOnd4gbt XRe5L2fFR9cQhazjXidttFVV5vg2+cP69/ZOUTKyijxIpG3o4fIRdnAypRYK2KnO5r sNqJlpYy6hGvCqcDUvY7rL5N1XtUR1hcAWV5QXZkbLY6qbZmxmQSZ7EcMyhQ0bcZuf mrdk+pQP8iJHxfDyIeEfEOcXZkKKJabqIQvcmB3hJdpY5hJjspTym+//wDJCKiARyl 5LYOfOZJF4zFv/zJ9cnkQwKrHcQTzp02kh/B9amzPF/IaEHQjhVWQ6Q+3Wrw8QoBPR N7WjBRl3tmZBA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5E5AE180055 for ; Wed, 18 Sep 2024 11:18:08 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mx1.dfw.automattic.com (mx1.dfw.automattic.com [192.0.84.151]) (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 ; Wed, 18 Sep 2024 11:18:06 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx1.dfw.automattic.com (Postfix) with ESMTP id 8EC22340E58 for ; Wed, 18 Sep 2024 11:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; h=content-transfer-encoding:content-type:content-type:subject :subject:message-id:date:date:from:from:in-reply-to:references :mime-version:received:received:received:received:received; s= automattic1; t=1726658160; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH +wGg26YPA=; b=HouI2Ydpl4cf/Wuan5Xf+mVOFOUmALM43dSEsBScaBGkUYgl9x Qqe98oaye1gKiz2azP/dmj9gFlJxHtc/mT8A5icawNOOAn4h/JXbUPFCoCqTznZk bk3JRXyP++/Wk5K1SrctUgeAMPig1YAgebd0ZvVNy3M+i0dFohlg+aLh15J7+qGQ WWMTeI+6OxuyWnhTMjt/sGg6Lwb/0xkVKi6VVD8iilzeIr0ufKpdLHS/5z7KRtUE LpdSuufpzq1/HvreDFXZNzEgJuosCn3LNydiiVzdmqpkD9ziyHU8rptpfiqia31m cLAw5hnFj4nBUu72eo70loDBWdohR5H+jiCg== X-Virus-Scanned: Debian amavisd-new at wordpress.com Received: from mx1.dfw.automattic.com ([127.0.0.1]) by localhost (mx1.dfw.automattic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YWjlAihcGYsD for ; Wed, 18 Sep 2024 11:16:00 +0000 (UTC) Received: from smtp-gw.dca.automattic.com (smtp-gw.dca.automattic.com [192.0.97.210]) (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 mx1.dfw.automattic.com (Postfix) with ESMTPS id 49532340E43 for ; Wed, 18 Sep 2024 11:16:00 +0000 (UTC) Authentication-Results: mail.automattic.com; dkim=pass (2048-bit key; unprotected) header.d=automattic.com header.i=@automattic.com header.b="bpWkEPey"; dkim=pass (2048-bit key; unprotected) header.d=automattic.com header.i=@automattic.com header.b="KW69S4ux"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=automattic.com header.i=@automattic.com header.b="VOD1EvnN"; dkim-atps=neutral Received: from smtp-gw.dca.automattic.com (localhost.localdomain [127.0.0.1]) (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 smtp-gw.dca.automattic.com (Postfix) with ESMTPS id E0B73A09A5 for ; Wed, 18 Sep 2024 11:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; s=automattic2; t=1726658159; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH+wGg26YPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=bpWkEPeyBAfnnAiLUDvEeQUbOzpSoRYTW0HpCvPRBCfWpG1Ef8oID3ivGXbxJEtLd ppdi3qmZAmZ8z/CF51su7xn17PZsEfh5lvj9632rQ7SjO02/wVa7xYSQbNtjTN0fIq 1qEzzxbR7PDCfpMJea9ls8XAq7OZYTUpTB41fBPBUMDPEMaqcHXpM2uoKznGSIXl/K UuW1URyZsxhU8rPww4SJKn9Eb35XF03z/NLdmcx4NwEsziLTMLLHOk7YyE20ySOcQf 7tx1pgCiuiTTiaXAzTvtakCCf2sDTZeJrOV5AZDDWA3bRPJOdCqVpBsb9keUp8upFO +2nz6oiOGULfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; s=automattic1; t=1726658159; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH+wGg26YPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KW69S4ux9YuNy4iz1w40fY26+9HfBesYMBupbwf3ZAS1F2Vy18DDO/J/72lhTnUC/ X3SgKd2/0CjHt2qIN+VMANe07yId2KJPyNCJf6mzkrrz78xsRL6EiD3OKfYEI2vovU q6R9x/8EjAG1y9AhmpxzwbbWVVC1S16AcMZPgQUBFfqwDs8s7oErjmLo6hPU0YfXlt kVACbPtB/9mje8QUS3YUIvBRZE5IvL2wHspKZXjTFAbt6s0QL2etlmGYVh4Kp+fPN9 HrAOpicUSI2WLTPWUuPwd1CIm9G2xzZ9VhqgcphRlqWwGrcdPqrargKv0VJPElnoPZ 4fCGBdCgMQLEg== Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-gw.dca.automattic.com (Postfix) with ESMTPS id BE564A0357 for ; Wed, 18 Sep 2024 11:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; s=automattic2; t=1726658159; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH+wGg26YPA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VOD1EvnNE+iP2UJ78EMqgzHgoPj5Ii9w/Ey1N3dYG/yGDj7R/XFKBobQdysEC4+30 oxqivtj3kYcauTKaFIQwAzvCBRWAS1rRj5I6Zp71LIxSpP4+jS8EvHaZLZ7e3zENPJ netQnNfLg0Mt08ZECKkx0HwNYRjRfnZ0GjVIgksuSSo6F6wFeH+HnPTCkKOyKbdsEF XykKl5KmKLJgUCzOveuXrmg+7tpTmkUmNpAS5J40mA19rLJuFhSnFn+HLwzCg4CygF BFhd7gbogN2DvPGHOCA+BxjYhE1hr8POC2iN95KL8REJk77gDxmBZ90ORvYZ4ACqKo 5WyThH667WXIw== Received: by mail-vk1-f200.google.com with SMTP id 71dfb90a1353d-5010aa74180so1413051e0c.0 for ; Wed, 18 Sep 2024 04:15:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726658159; x=1727262959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ISps8Ys7nWJfz5gxKQvDQDCJ6A7njcO9NH+wGg26YPA=; b=Xn/2x4K7zYH8tPwlpqliJn/mdrFEIMCDjjX56Kuzfh5P4Xxldj9Nns+TPWLxKQMymh tVRj03rmtIPu03wMMeYRJul0g/CKBPeJjyiX0AwZ7zybIz4/kJDOY7DahhoDWUXHxftK GIjnCj5wKROWveso9Cdt/ZmH9XorKXNxG1ectjeIiKa/DYWmLn8Dl1sy2ak5B0vdUX8P sr0HK9YJ5saLDF+81IqE7E2lpT6LtSRu+93p/dGU4LeeGGNU9B9DAT1ZwNFkgP9c3JqV YfXry+pSby0oxAZqMiFgGhDWRzbrA/vHwDmaAfBc9DzWq7BY3kImTSUp7X/EOqDseUu9 9XXQ== X-Forwarded-Encrypted: i=1; AJvYcCUeVzlEIwEhy0t39AScJ1GeOc0SM5aB+AP+hAweVyKG6J7SnmTEzF0mQq1eTJeZcs3sBsq2Wkgagas=@lists.php.net X-Gm-Message-State: AOJu0Yz9YvZDnNX6SHZQ86EBn9ioNUFHzrYruK0on0p+RFrmML9maQ7W RdFGtTQcZ0vStykZwfo4EUkqUd5GlrCTLon4bjVnIiSO3bSF+68t37CLRZiZ97qwx4hmv3sMfTC uIsfGSN3Qn6WYTZ7UAoFchQo4ka9VIg30IXEvFZzZOw0dk9C377kMrJGQSwzt2eRuOf6F6W/YQx aw+AgUbeNF/tHx4NWDe+OrkuaS1uls2g== X-Received: by 2002:a05:6122:169d:b0:4f5:2276:136d with SMTP id 71dfb90a1353d-5032d39b051mr15986403e0c.1.1726658159300; Wed, 18 Sep 2024 04:15:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHqW11gkgAQE7sOCgf3uo7HI21dG4PD1BsVugoQsN1tO/q171uFIbmEH3MDge1s2gpj1dPadgRzkDuOa7pnjyM= X-Received: by 2002:a05:6122:169d:b0:4f5:2276:136d with SMTP id 71dfb90a1353d-5032d39b051mr15986397e0c.1.1726658158975; Wed, 18 Sep 2024 04:15:58 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <8D420123-4ECF-48FD-A9C3-F80C60457A37@newclarity.net> In-Reply-To: Date: Wed, 18 Sep 2024 13:15:48 +0200 Message-ID: Subject: Re: [PHP-DEV] Zephir, and other tangents To: Hammed Ajao Cc: Mike Schinkel , PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: adam.zielinski@automattic.com (Adam Zielinski) On Wed, Sep 18, 2024 at 2:39=E2=80=AFAM Hammed Ajao w= rote: > Running Wasm and PHP virtual machines together presents several significa= nt challenges and potential issues: > =E2=80=A2 Memory Management and Isolation: Each VM has its own memory mod= el and garbage collection strategy. Data passing between VMs often requires= expensive memory copying. Coordinating garbage collection can lead to memo= ry leaks or crashes if not handled properly. > =E2=80=A2 Performance Impacts: Context switching between VMs introduces o= verhead, especially with frequent interactions. Interoperability can create= latency due to data serialization and deserialization. Synchronization iss= ues may arise when one VM needs to wait for the other. > =E2=80=A2 Security Concerns: Discrepancies between PHP's more permissive = environment and Wasm's stricter sandboxing can create vulnerabilities. The = communication layer between VMs could be exploited for cross-VM attacks if = not properly secured. > =E2=80=A2 Debugging Complexities: Developers must use separate debugging = tools for each VM. Stack traces spanning two execution contexts can be conf= using and hard to interpret. > =E2=80=A2 Compatibility and Maintenance: Independent evolution of PHP and= Wasm VMs may introduce breaking changes, requiring constant updates to the= integration layer. API changes in either environment necessitate adjustmen= ts in the integration code. > =E2=80=A2 Resource Consumption: Running two VMs simultaneously increases = CPU and memory usage. Longer initialization times may impact applications r= equiring quick boot times. > =E2=80=A2 API and Communication Design: Designing efficient and secure AP= Is for inter-VM communication is critical but challenging. Marshaling data = between PHP and Wasm adds complexity, especially when different programming= languages are involved. > While these are definitely challenges, aren't they largely the same for most languages intending to support WebAssembly? =E2=80=93 Adam