Skip to content

Add Linux ARM64 GNU fallback support for Android ARM64#56

Draft
JasoonS wants to merge 1 commit intomainfrom
claude/fix-hypersync-android-QeuJA
Draft

Add Linux ARM64 GNU fallback support for Android ARM64#56
JasoonS wants to merge 1 commit intomainfrom
claude/fix-hypersync-android-QeuJA

Conversation

@JasoonS
Copy link
Contributor

@JasoonS JasoonS commented Mar 9, 2026

Summary

This PR adds fallback support for loading Linux ARM64 GNU native binaries on Android ARM64 platforms. Since Android is Linux-based under the hood, the Linux ARM64 GNU binary can serve as a fallback when Android-specific binaries are not available.

Key Changes

  • Added a comment clarifying the Android-specific binary loading strategy in index.js
  • Implemented fallback logic to attempt loading the Linux ARM64 GNU binary (hypersync-client.linux-arm64-gnu.node) on Android ARM64 platforms
  • Added fallback to load the @envio-dev/hypersync-client-linux-arm64-gnu npm package with version validation (expects version 1.1.0)
  • Updated npm/linux-arm64-gnu/package.json to declare support for both linux and android operating systems

Implementation Details

  • The fallback attempts are made after trying Android-specific binaries, maintaining the preference for platform-specific implementations
  • Version checking is enforced via the NAPI_RS_ENFORCE_VERSION_CHECK environment variable to ensure compatibility
  • All load attempts are wrapped in try-catch blocks with errors collected for debugging purposes

https://claude.ai/code/session_015zso6wY1hJMst67LiXp4LW

On Android, process.platform returns 'android' instead of 'linux', so the
NAPI-RS generated loader looks for android-specific binaries that don't exist.
Since Android is Linux under the hood, the Linux arm64 GNU binary works fine.

Changes:
- index.js: Add fallback to linux-arm64-gnu binary in the Android arm64 path
- npm/linux-arm64-gnu/package.json: Add 'android' to os array so npm installs
  the linux-arm64-gnu package on Android devices

https://claude.ai/code/session_015zso6wY1hJMst67LiXp4LW
@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba17513a-7f37-4446-80dd-15203ab53fc2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/fix-hypersync-android-QeuJA

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

2 participants