Skip to content

Standalone binaries (embed) and static builds for Windows #2503

Description

@m-this

Describe your feature request

Is your feature request related to a problem? Please describe.
Since #2119 (v1.12), FrankenPHP runs natively on Windows, but standalone app binaries (embed) and static builds remain Linux/macOS only: the frankenphp SAPI of static-php-cli isn't available on Windows, and build-static.sh is a Bash script. Distributing a self-contained .exe (app + PHP + Caddy) is currently impossible.

Describe the solution you'd like
Support creating standalone Windows binaries:

  • add Windows support to the frankenphp SAPI in static-php-cli, which already builds static PHP with MSVC on Windows for its cli and micro SAPIs;
  • provide a Windows counterpart to build-static.sh (e.g. PowerShell). The Go side (embedding the app as a tarball via go:embed) should work on Windows as-is now that FrankenPHP compiles there with Clang against MSVC-built PHP (Go 1.26).

Describe alternatives you've considered

  • Building Linux binaries from Windows via Docker or WSL (works today);
  • Shipping the Windows release archive (frankenphp.exe + official PHP binaries) next to the app, which is not a single binary.

Related docs PRs: #2500, #2501.


Update: static-php-cli main (v3, unreleased) already ships a Windows build stage for the frankenphp target, so the remaining work is mostly on the FrankenPHP side (build script, docs, CI).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions