Re: [PECL-DEV] filesystem notification extension

[email protected] (Frederik Bosch) Mon, 5 Aug 2024 17:21:12 +0200
Newsgroups php.pecl.dev
Message-ID <[email protected]>
On 04-08-2024 20:27, Christoph M. Becker wrote:
> On 30.07.2024 at 16:43, Frederik Bosch wrote:
>
>> On 30-07-2024 15:29, Christoph M. Becker wrote:
>>
>>> On 30.07.2024 at 14:43, Derick Rethans wrote:
>>>
>>>> I would also say that it is unexpected to suddenly also have to download
>>>> a gazilion crates (it took 432MB!), on top of a whole rust compile
>>>> stack. Server environments will not likely to have this pre-installed
>>>> either.
>>> But this is unlikely to be the right thread, and maybe even not the most
>>> suitable mailing list.  I wonder where to continue the discussion?
> I've started a new thread about general discussion a few days ago, but
> didn't get any replies yet.
>
>> While I totally understand this feels like you get a node_modules folder
>> for free when running cargo build, I did want to share my extension
>> because there might be other people interested in using filesystem
>> notifications. Personally, I use this to detect changes in #[Attributes]
>> in my PHP classes.
>>
>> If you decide to refuse the extensions for PECL, I'd be disappointed,
>> but I could also understand. I nonetheless agree with Christoph, as a
>> developer this was a very good experience for creating an extension.
> It's likely not only about the developer experience, but also about
> security.  I've just learned about DARPA’s Translating All C to Rust
> (TRACTOR) program[2], and Microsoft already has started to rewrite core
> code in Rust, as well as the Linux kernel having added support for
> Rust[3].  And that's all about avoiding memory safety issues, typical
> for C code.
>
> Sooner or later PHP/PECL has to deal with Rust code, and it might be
> better to address that issue early (well, "early" was likely months ago,
> but well).
>
> I'm generally fine having PECL extensions written in Rust, *if* these
> extension clearly signal that requirement.  A prominent note in the
> documentation would certainly a good first step.  Not sure what else
> could be done; upgrading the PECL package.xml format might be an option
> (does it even signal whether an extension requires an C++ compiler?)
> And of course, we should see what the PIE developers have to say about
> that[4].
>
> [1]<https://news-web.php.net/php.pecl.dev/17603>
> [2]<https://www.darpa.mil/news-events/2024-07-31a>
> [3]<https://rust-for-linux.com/>
> [4]<https://github.com/php/pie/issues/26>
>
> Christoph

Dear Christoph,

Thank you for your work so far. I think signaling, for me, is no 
problem. A specific tag or attribute in the package.xml would be a good 
way forward, maybe a new tag <cargo> under <dependencies>. But in the 
meantime the description tag and the documentation page can address it too.

Regards,
Frederik