phpv8 / php-v8

PHP extension for V8 JavaScript engine
https://php-v8.readthedocs.io
MIT License
217 stars 14 forks source link

Implement ES Modules #82

Closed pinepain closed 6 years ago

pinepain commented 6 years ago

It looks like it has been been finalized in https://github.com/v8/v8/commit/a067281d3910a64303dfa8ed7fdd2c9604df3149, so it's more or less safe to implement.

I've been working on modules support back in Feb 2017 in add-harmony-modules-support. Draw inspiration from it and from v8's d8.cc.

This may probably include dynamic imports too (https://github.com/v8/v8/commit/67aae25f61b8fd116dd6ba9c67ff7be2ae6de175#diff-3dd7a0f46b1e5c1cc67921449e7180ac), though, let's give it a closer look first.

Give a look to SetHostImportModuleDynamicallyCallback() andSetHostInitializeImportMetaObjectCallback()` when implementing dynamic import.

pinepain commented 6 years ago

I would really appreciate some sponsorship on this issue. If you are using php-v8, you like what I'm doing or want to support the project or me personally, please let me know and I'll get in touch do discuss details.

The reason for that it would take a noticeable amount of time and efforts to implement ES modules and dynamic imports API support properly.

pinepain commented 6 years ago

I'm moving away from PHP world and all my PHP projects going to be abandoned too. Abandoning this project too as I have no intent to continue working on it unless there would be strong request from community and commercial interest. No more updates or documentation will be made. If someone is interested, feels free to contact me using email specified in my GitHub profile.