lisachenko / z-engine

:zap: PHP Engine Direct API
MIT License
448 stars 22 forks source link

Add Windows platform support #1

Closed lisachenko closed 4 years ago

lisachenko commented 4 years ago

Currently this library uses some exported functions for hashes and opcode handler manipulation. Unfortunately, under Windows platform, PHP uses __vectorcall convention which is not supported by libffi, thus symbol can't be resolved.

This issue can be solved in two ways: by adding support for __vectorcall convention in libffi or by writing hash functions from scratch, which is not easy task right now.

lisachenko commented 4 years ago

Related to the https://github.com/libffi/libffi/issues/500 and described as bug at https://bugs.php.net/bug.php?id=78270&edit=2

lisachenko commented 4 years ago

Partial support of __vectorcall was added in the snapshot: https://windows.php.net/downloads/snaps/ostc/ffi-vectorcall/

Thus, library can work with Windows platform too 👍 Need to add simple macros resolving for defintions, as well, as loading of php7.dll for Windows platform

lisachenko commented 4 years ago

This issue can be resolved right now, waiting for the merge of patch by @cmb69 into the libffi and PHP itself.