Skip to content

Pre-built binaries for PIE installation #162

@derrickschoen

Description

@derrickschoen

Problem

Every install method (PIE, PECL, manual) compiles the Rust FFI library from source. This takes 8-10 minutes and requires a Rust toolchain on the target machine.

Proposal

Ship pre-compiled valkey_glide.so binaries as GitHub Release assets so pie install downloads a binary in seconds instead of compiling.

PIE supports this via download-url-method: ["pre-packaged-binary", "composer-default"] in composer.json and a naming convention for release assets:

php_valkey_glide-{ver}_php{major.minor}-{arch}-{os}-{libc}{-zts}.zip

What's needed

  1. A release-binaries.yml workflow triggered on release: published
  2. download-url-method added to composer.json php-ext section

Suggested matrix (24 binaries)

Platform PHP Thread safety
Linux glibc x86_64 8.2, 8.3, 8.4, 8.5 NTS, ZTS
Linux glibc aarch64 8.2, 8.3, 8.4, 8.5 NTS, ZTS
macOS aarch64 8.2, 8.3, 8.4, 8.5 NTS, ZTS

Pipeline design

The Rust FFI static library (libglide_ffi.a) is PHP-version-independent. Build it once per (OS, arch), then compile only the PHP C wrapper per combination. This avoids rebuilding Rust 24 times.

  • Stage 1: 3 jobs (~3 min each) — build libglide_ffi.a
  • Stage 2: 24 jobs (~1 min each) — compile C wrapper, verify, package ZIP
  • Stage 3: 1 job — attach ZIPs to release

Reference

Sample implementation

Working PR with all CI checks passing: derrickschoen#7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions