Skip to content

Publish a Linux ARM64 (aarch64) hermesc binary in hermes-compiler #2194

Description

@nnnnoel

Problem

The hermes-compiler npm package does not include a native hermesc executable for Linux ARM64 (aarch64) hosts. In hermes-compiler@250829098.0.17, the packaged hermesc/linux64-bin/hermesc is an x86-64 ELF executable; the other packaged host binaries are for macOS and Windows.

We run React Native 0.87.1 / Hermes on a Linux ARM64 CI runner to produce OTA Hermes bytecode for iOS and Android. A tool that selects linux64-bin/hermesc on Linux fails before compilation:

$ file node_modules/hermes-compiler/hermesc/linux64-bin/hermesc
ELF 64-bit LSB executable, x86-64, statically linked

$ node_modules/hermes-compiler/hermesc/linux64-bin/hermesc --version
.../hermesc: 1: Syntax error: word unexpected (expecting ")")

The second command exits with code 2. The failure occurs on an ARM64 host because the published Linux executable is for x86-64, not because of the JS bundle. This blocks native ARM64 CI jobs that need to compile Hermes bytecode, including OTA builds that do not run Gradle.

Solution

Could Hermes publish a Linux ARM64/aarch64 host hermesc binary for each matching hermes-compiler release, with a documented package path or a platform-specific package? It would help to validate the published binary's architecture and --version in the release pipeline. The compiler version must remain paired with the Hermes version bundled by React Native so the generated bytecode is compatible with the app runtime.

We can build hermesc from the matching Hermes source tag and substitute it in CI, but every consuming project then has to maintain its own binary distribution and version checks. Running the x86-64 binary through emulation or moving the CI job to x86-64 also prevents us from using the native ARM64 runner.

Additional Context

  • hermes-compiler: 250829098.0.17
  • React Native: 0.87.1
  • Host: Linux ARM64/aarch64, containerized GitHub Actions runner
  • Related but distinct: Is it possible to react-native integrate custom hermes build in linux arm aarch64?  #995 covers compiling a custom hermesc on Linux ARM. This request is for an officially published ARM64 host binary in the npm release.
  • The OTA tool's Linux binary-path selection is a separate integration issue; publishing an ARM64 binary would provide the artifact it needs to select.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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