-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support extensions written in Rust? #26
Comments
If a Rust ext uses |
https://pecl.php.net/package/skywalking is already on PECL (and there may be more), and https://github.com/genkgo/php-ext-fs-notify has requested to be added to PECL. Note that both extensions use https://github.com/phper-framework/phper. The problem is not necessarily that these extensions don't support If an extension written in Rust would support Windows (I'm not aware of any), that might also be an issue for https://github.com/php/php-windows-builder. Anyway, I don't necessarily suggest that there needs to be full Rust build support in PIE, but rather that there is some information in the schema (maybe just rough, or maybe more thorough), and maybe that this is checked before even downloading and trying to install such extensions. |
I don't know much about pie, but I would suggest to try being agnostic to the build system. Even for C (or C++) extensions there is some value in CMake or other build systems. (Better cross platform support, tooling support, some libraries one was TA to wrap might use CMake or other as their primary system etc ) |
I don't think pie currently first checks for a working C compilation set-up. At least, PECL never used to do that. So although "pie" doesn't take a working rust build system under consideration, it is no different than checking for a working C build system. So I guess that that could be the real question here — whether it should check for a working build environment? I don't think PIE should first check for a working build (C/Rust) environment, as there will be way too many permutations. |
Not necessarily. In my opinion it would be sufficient to have some information in the schema. Not sure if https://github.com/ThePHPF/pie-design/blob/main/composer-json-php-ext-schema.json is up-to-date, but it could be added there (or whereever), so users (not necessarily PIE) could check that in advance. Maybe there could even be a PIE (sub-)command to list these requirements (perhaps something like |
It's certainly something that could be considered as an enhancement at some point, but for the initial iteration lets try and keep it simple 😁 |
At the very least, it appears sensible to me to add some info to the schema right away; maybe similar to "support-zts" (which, by the way, does not really cater to extensions which require ZTS, like PECL/parallel). |
Later this month, I am going to publish the fs-notify extension, and I will test if it works with PIE too. If not, I'll try to come up with a PR. |
@cmb69 For example in dd-trace extension, cargo is required. |
Ah, nice! :) |
There is some discussion about PECL extensions written in Rust on the PECL mailing list (https://news-web.php.net/php.pecl.dev/17600 ff), but so far without any consensus. Since @derickr said:
So maybe it's a good idea to consider this?
The text was updated successfully, but these errors were encountered: