On Tue, Dec 19, 2023 at 3:35 AM Vinicius Dias <carlosv...@gmail.com> wrote: > > > > I suppose it'd be possible to improve FFI to call the PHP VFS layer to > > > resolve a path, which would handle the phar:// scheme and other schemes. > > > But, I would be worried about potential other downstream impacts - esp. > > > security 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#use-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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php