Skip to content

fix(rust): fix SIMDe configuration on aarch64 platforms when not installed yet#63

Merged
nyurik merged 7 commits intofast-pack:mainfrom
yutannihilation:fix/build-simde-on-aarch64
Feb 25, 2026
Merged

fix(rust): fix SIMDe configuration on aarch64 platforms when not installed yet#63
nyurik merged 7 commits intofast-pack:mainfrom
yutannihilation:fix/build-simde-on-aarch64

Conversation

@yutannihilation
Copy link
Contributor

(In order to fix build on aarch64 platfroms, #62 is still needed in addition to this change)

I was wondering why the FastPFOR-rs repository tests macOS runner without installing SIMDe; FastPFOR fetches and build SIMDe automatically. However, it seems the include path and define are not configured correctly when with cxx_build::bridge(). So, this pull request attempts to fix it by manually doing the equivalent to this part of cmake_modules/simde.cmake.

target_include_directories(simde INTERFACE "${simde_SOURCE_DIR}")

# Enables native aliases. Not ideal but makes it easier to convert old code.
target_compile_definitions(simde INTERFACE SIMDE_ENABLE_NATIVE_ALIASES)

Copilot AI review requested due to automatic review settings February 25, 2026 10:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts the Rust build script so the CXX bridge compilation on aarch64 mirrors FastPFOR’s SIMDe configuration when SIMDe is fetched by CMake (instead of preinstalled), and updates the README to reflect that SIMDe is typically not a manual dependency on Apple Silicon.

Changes:

  • Update build.rs to reuse CMake-fetched SIMDe headers and add the SIMDE_ENABLE_NATIVE_ALIASES define for the CXX bridge on aarch64.
  • Add a build-time warning when SIMDe headers can’t be found in the CMake output.
  • Update README platform instructions to make SIMDe installation optional and describe fallback options.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
build.rs Detect aarch64 and try to add SIMDe include path + compile define to the CXX bridge compilation.
README.md Update build prerequisites to make SIMDe optional and clarify macOS/Apple Silicon expectations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@nyurik nyurik changed the title fix(rust): fix SIMDe configuration on aarch64 platforms when not installed yet fix: install SIMDe on aarch64 and bump CPP dependency Feb 25, 2026
@nyurik nyurik changed the title fix: install SIMDe on aarch64 and bump CPP dependency fix(rust): fix SIMDe configuration on aarch64 platforms when not installed yet Feb 25, 2026
@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

❌ Patch coverage is 44.44444% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
build.rs 44.44% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Member

@nyurik nyurik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@nyurik nyurik merged commit ef5904f into fast-pack:main Feb 25, 2026
12 checks passed
@yutannihilation yutannihilation deleted the fix/build-simde-on-aarch64 branch February 25, 2026 22:01
nyurik pushed a commit that referenced this pull request Feb 25, 2026
After #63, installing SIMDe should not be necessary. So, this pull
request simplifies the CI settings by removing `brew install simde`.
CommanderStorm added a commit to maplibre/maplibre-tile-spec that referenced this pull request Feb 25, 2026
I believe fast-pack/FastPFOR-rs#62 and
fast-pack/FastPFOR-rs#63 fixed the compilation
problem on aarch64 platforms. Now that FastPFOR is updated to v0.7, I
think we can enable build on Arm Linux and Arm macOS again (At least, I
have no difficulty to build this on my macOS).

(But, I don't know what issues "Currently, seems flaky" comment refers
to, so it's possible I miss some problems...)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants