From 2a2a34275b67ec933ed50ec17ca411949943b3f0 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Mon, 26 Oct 2026 07:43:11 -0700 Subject: [PATCH 1/4] CI: Run tests on arm too --- .github/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3aa6cb0..b1e540c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,6 @@ jobs: php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, rust ${{ matrix.rust }}) - runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -45,6 +44,8 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] + os: ["ubuntu-26.04", "ubuntu-26.04-arm"] + runs-on: ${{ matrix.os }} steps: # We need to clone and configure PHP so that bindings can be generated # in the build script for clippy; need to build it so that php-config @@ -102,7 +103,6 @@ jobs: php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, rust ${{ matrix.rust }}) - runs-on: ubuntu-latest strategy: fail-fast: false matrix: @@ -110,6 +110,8 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] + os: ["ubuntu-26.04", "ubuntu-26.04-arm"] + runs-on: ${{ matrix.os }} steps: - name: Checkout PHP uses: actions/checkout@v7 From 7f8a583e127c02c9f2998b0ea76e03eab55793df Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Mon, 26 Oct 2026 07:46:08 -0700 Subject: [PATCH 2/4] Ubuntu 24.04, show OS in name --- .github/workflows/test.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1e540c..dcc9306 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,7 +36,7 @@ jobs: Run clippy (${{ matrix.php }}, php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, - rust ${{ matrix.rust }}) + rust ${{ matrix.rust }} on ${{ matrix.os }}) strategy: fail-fast: false matrix: @@ -44,7 +44,7 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] - os: ["ubuntu-26.04", "ubuntu-26.04-arm"] + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] runs-on: ${{ matrix.os }} steps: # We need to clone and configure PHP so that bindings can be generated @@ -102,7 +102,7 @@ jobs: Run tests (${{ matrix.php }}, php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, - rust ${{ matrix.rust }}) + rust ${{ matrix.rust }} on ${{ matrix.os }}) strategy: fail-fast: false matrix: @@ -110,7 +110,7 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] - os: ["ubuntu-26.04", "ubuntu-26.04-arm"] + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] runs-on: ${{ matrix.os }} steps: - name: Checkout PHP From a123324a90f696295b7677f9a0c9962906836324 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Mon, 26 Oct 2026 08:38:41 -0700 Subject: [PATCH 3/4] Blocklist simd --- crates/sys/build.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/sys/build.rs b/crates/sys/build.rs index 12bec32..2153028 100644 --- a/crates/sys/build.rs +++ b/crates/sys/build.rs @@ -66,6 +66,23 @@ fn main() { // type which is only declared in a C file. Also cannot manually reexport // so just block it entirely .blocklist_function("zend_lazy_object_get_instance") + // __m128i isn't FFI safe in zend_simd.h and those functions cannot be + // marked with target_feature, rust-lang/rust-bindgen#3533 + .blocklist_function("_mm_sll_epi16") + .blocklist_function("_mm_sll_epi32") + .blocklist_function("_mm_sll_epi64") + .blocklist_function("_mm_sra_epi16") + .blocklist_function("_mm_sra_epi32") + .blocklist_function("_mm_srl_epi16") + .blocklist_function("_mm_srl_epi32") + .blocklist_function("_mm_srl_epi64") + .blocklist_function("_mm_madd_epi16") + .blocklist_function("_mm_mulhi_epi16") + .blocklist_function("_mm_mulhi_epu16") + .blocklist_function("_mm_mullo_epi16") + .blocklist_function("_mm_mul_epu32") + .blocklist_function("_mm_sad_epu8") + .blocklist_function("_mm_movemask_epi8") .default_enum_style(EnumVariation::ModuleConsts) .merge_extern_blocks(true) // SLOW and didn't actually add anything From 0ce699fe00792c61ebe6d53ee55b9e4151f5368e Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Mon, 26 Oct 2026 08:44:59 -0700 Subject: [PATCH 4/4] Try to exclude reexport.c --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dcc9306..d855c50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -95,7 +95,9 @@ jobs: uses: ./php/php-src/ext/rust-ext/.github/actions/verify-generated with: working-directory: php/php-src/ext/rust-ext - extra-pathspec: ':(exclude)crates/sys/bindings.rs' + extra-pathspec: > + ':(exclude)crates/sys/bindings.rs' + ':(exclude)crates/sys/reexport.c' test: name: >