Goal
Support running z-engine on Windows x64. The runtime resolves FFI definitions by platform key, so the work is generating and validating windows-x64 artifacts and handling the Windows-specific symbol loading.
What's needed
- Header generation on Windows.
emit.php relies on clang, cpp/clang -E, php-config and a C compiler. On Windows this needs the PHP SDK toolchain (or clang-cl) and the PHP dev pack headers. generate.php's Docker orchestration is Linux-only; a Windows path (native or a Windows CI runner) is required.
- Symbol loading. Unlike Linux/macOS (which resolve engine symbols from the running process), Windows needs
FFI_LIB pointing at the PHP DLL (historically php7.dll; for PHP 8 it's php8ts.dll/php8.dll depending on the build). The generated header currently only emits FFI_SCOPE; the Windows generator will need to emit the correct FFI_LIB line, and Core will need to select it.
- Calling convention.
ZEND_FASTCALL maps to __vectorcall on Windows — verify the generated declarations handle this (the current generator strips it via cpp, which may or may not be correct for the ABI).
- ZTS. Official Windows PHP builds are commonly thread-safe; this likely needs the ZTS runtime work (separate issue) as a prerequisite.
Acceptance
- Generated
include/8.4/windows-x64-*/* validated against a real Windows PHP 8.4 build
- Symbol resolution via the correct PHP DLL
- A Windows CI job runs at least the non-destructive suite
Part of the platform-support roadmap referenced in the README support matrix (see #57).
Goal
Support running z-engine on Windows x64. The runtime resolves FFI definitions by platform key, so the work is generating and validating
windows-x64artifacts and handling the Windows-specific symbol loading.What's needed
emit.phprelies onclang,cpp/clang -E,php-configand a C compiler. On Windows this needs the PHP SDK toolchain (or clang-cl) and the PHP dev pack headers.generate.php's Docker orchestration is Linux-only; a Windows path (native or a Windows CI runner) is required.FFI_LIBpointing at the PHP DLL (historicallyphp7.dll; for PHP 8 it'sphp8ts.dll/php8.dlldepending on the build). The generated header currently only emitsFFI_SCOPE; the Windows generator will need to emit the correctFFI_LIBline, andCorewill need to select it.ZEND_FASTCALLmaps to__vectorcallon Windows — verify the generated declarations handle this (the current generator strips it via cpp, which may or may not be correct for the ABI).Acceptance
include/8.4/windows-x64-*/*validated against a real Windows PHP 8.4 buildPart of the platform-support roadmap referenced in the README support matrix (see #57).