-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
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
- A
release-binaries.ymlworkflow triggered onrelease: published download-url-methodadded tocomposer.jsonphp-extsection
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
- PIE pre-packaged-binary docs
- php/pie-ext-binary-builder (official GitHub Action)
- ptondereau/biscuit-php (Rust PHP extension shipping 24 binaries via PIE)
Sample implementation
Working PR with all CI checks passing: derrickschoen#7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels