Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122014 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38636 invoked from network); 19 Dec 2023 08:11:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Dec 2023 08:11:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D8825180059 for ; Tue, 19 Dec 2023 00:11:45 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 ; Tue, 19 Dec 2023 00:11:45 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id 46e09a7af769-6d9daa5207eso3130415a34.0 for ; Tue, 19 Dec 2023 00:11:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702973483; x=1703578283; darn=lists.php.net; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kAiTjV+81DP52u41f96PXUXjX2f9Y26gdRoV14TcoQU=; b=e3Mqw83En8Wr9xBz463LH9IB28xx9qKVN/MQfr4y/TRcTsBhHSLLAoC8gCLTjPlVmT OCO5ShdOifTiYi3j40vxSGtYPZGLBJDWXaPOrzBnVTpd2kf2/neH6E4RjqT1XMX5Pb1V vLutFt+hg35qY6P6n4oqMW6kk25VbBQ9wj8PIsCRXOnTJ/UtM8WBkYw7zCuJU3rKGj+L q09GpsSQZ2zlmbDYGfAJLs5UhlEjJTkgTZV5EK2NXYBbefToKEE87tTv2JPxM3Mdyeqd vCnUBV6RBBBchXBiby5xtP2whq+aQTaIr3pKhlsmzuETLJW8Fzjt9zTwZ9YtK4vKUG7m vM1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702973483; x=1703578283; 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=kAiTjV+81DP52u41f96PXUXjX2f9Y26gdRoV14TcoQU=; b=PXhByeJiNb5KJ5QXeHveOF2IK3KFo+/u1kb7ciKr0h+vk1L8zW8I6xiMvoI68YPbkv 0k4RTARZovw0+NjH17q/2FGV82xciIbsVf2J4ZmiEOwuPNLXy00Rjg1+//gq8qJZs+Gl XtyX2VgAB8AxdORJyVf4lBn3I6DgmJ5d82peNW6xjAFDA8MX2xppRBnj4zgkQtyOe0nD ioMK/1UVM1deYWxtVTyECbLRn4cw/tvb8xrKSgiBAxZkyC13BiaDllrovyGgR3Kd5X3d MCH9Efo4axN0q1gpySwF8tzyrzCau90dCWinjBl/nazFqVo4jndm+UDB/ca8pCYfZyXw l/Iw== X-Gm-Message-State: AOJu0YzPHcoYrgxqk2AwhxMqhP0ml9Z4PDKaug/1epHPBU9yYBuzj5PI iOpxAJjzXdLxy1BL128ftbupIPQ/ZNIdW+ZxHOz279GzFaTTbg== X-Google-Smtp-Source: AGHT+IHQq2IuoLZwKAG7SvO4HKQx1aLDBu5JQTgNfpBpEcJtdur74+NXGETIu0hSpHpjqYn7paKsP/gycBVNRpYq1qA= X-Received: by 2002:a05:6870:a708:b0:203:9d13:5e97 with SMTP id g8-20020a056870a70800b002039d135e97mr5625593oam.37.1702973483608; Tue, 19 Dec 2023 00:11:23 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 19 Dec 2023 09:11:09 +0100 Message-ID: To: Vinicius Dias Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] FFI in PHAR files From: landers.robert@gmail.com (Robert Landers) On Tue, Dec 19, 2023 at 3:35=E2=80=AFAM Vinicius Dias wrote: > > > > I suppose it'd be possible to improve FFI to call the PHP VFS layer t= o resolve a path, which would handle the phar:// scheme and other schemes. = But, I would be worried about potential other downstream impacts - esp. sec= urity implications - as this is a novel (to me at least) scenario. > > I just realized I never explained the reason for me to wanna use this > feature. My bad. > > I have a CLI project that uses FFI and it would be awesome if I could > share it using the micro sfx API[1]. > > If FFI was supported inside PHARs, we could even create Desktop > applications using tools such as php-tkui[2] and make them available > via the aforementioned SAPI. > > Anyway, I just wanted to explain the motive behind my original question. = :-D > > [1]: https://github.com/crazywhalecc/static-php-cli/blob/main/README.md#u= se-micro > [2]: https://github.com/skoro/php-tkui > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > Hello, > I have a CLI project that uses FFI and it would be awesome if I could > share it using the micro sfx API[1]. If you choose not to use a phar, but instead, just loose PHP files, it extracts the sources to a random `/tmp` directory when executing. So, FFI and other things should "just work" without any shenanigans. Robert Landers Software Engineer Utrecht NL