Skip to content

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 02 May 07:23

Alpine Linux Support

Pre-built binaries and Docker install images now available for Alpine Linux (musl libc). Fixes #9.

What's New

  • Alpine binary buildslinux-musl .so files for PHP 8.2/8.3/8.4/8.5 on x86_64 and ARM64, both NTS and ZTS. Asset names follow the standard PIE convention: php_grpc-v0.2.2_php{X.Y}-{arch}-linux-musl.zip (and -zts variant).
  • Alpine Docker imageslatest-php{X.Y}-alpine and latest-php{X.Y}-alpine-zts tags pushed to ghcr.io/bsn4/grpc-php-rs. The image bundles libgcc_s.so.1 so users don't need apk add libgcc separately.

Usage

FROM php:8.5-alpine
COPY --from=ghcr.io/bsn4/grpc-php-rs:latest-php8.5-alpine /usr/local/ /usr/local/

For ZTS Alpine (FrankenPHP, Swoole on Alpine):

COPY --from=ghcr.io/bsn4/grpc-php-rs:latest-php8.5-alpine-zts /usr/local/ /usr/local/

Or via PIE:

pie install bsn4/grpc

PIE auto-detects musl and downloads the right binary.

Technical Notes

Rust's musl target is static-only by default and rejects cdylib output. We set RUSTFLAGS="-C target-feature=-crt-static" to enable dynamic linking. Manual binary downloads on Alpine (without using the Docker install image) need apk add --no-cache libgcc since the .so depends on libgcc_s.so.1 at runtime.

Full Changelog: v0.2.1...v0.2.2