Skip to content

Android Runtime Updates and One Shared Engine Layer - #67

Draft
ammarahm-ed wants to merge 332 commits into
refactorfrom
port/android-updates-on-refactor
Draft

Android Runtime Updates and One Shared Engine Layer#67
ammarahm-ed wants to merge 332 commits into
refactorfrom
port/android-updates-on-refactor

Conversation

@ammarahm-ed

@ammarahm-ed ammarahm-ed commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Update the android layer to latest changes from https://github.com/NativeScript/napi-android and in doing so collapses the two per-platform engine layers into a single unified layer.

Apple and Android now share a single backend per engine rather than keeping parallel copies that drift, run against the same engine versions, and fetch their prebuilt binaries on demand instead of carrying them in the repository.

  • NativeScript/napi/<engine>/ now includes only the jsr layer.
  • vendor/ has all engine related headers, sources, napi bindings etc shared by both Apple & Android

What changed

One engine layer for both platforms

  • V8, JSC, QuickJS and Hermes each collapse to a single backend shared by Apple and Android, instead of a copy per platform
  • Each engine's Node-API layer moved under a common vendor location, and the vendored Hermes and V8 headers are shared rather than forked
  • Hermes updated, with Apple and Android now built against the same Hermes version from the same release. Right now it picks the updated release from https://github.com/ammarahm-ed/build-hermes/releases/tag/build-d207b501aecb. It includes a single host_objects patch for napi android currently.
  • Hermes serves both Node-API ABIs from one runtime
  • QuickJS-NG is now the QuickJS engine on both platforms, from a patched vendored tree; the Bellard tree and its bundled allocator are removed, and the old engine name is kept as an alias so existing builds keep working. mimalloc is also removed as it stopped making a performance difference in latest quickjs engines.
  • V8 moves to the 14.9 API, and the two long-dead V8 versions are dropped. Using https://github.com/ammarahm-ed/v8-buildscripts/releases/tag/v8-14.9.207.39-5 which should be merged upstream
  • Engine binaries and headers are fetched on demand rather than committed, which takes several hundred megabytes out of the repository

Android runtime

  • Java runtime layer, JNI Node-API interop, runtime core, native workers and the inspector
  • Engine support for V8, JSC, Hermes, QuickJS and PrimJS, with host object support added or rewritten per engine
  • Test-app suites and build tools, and Gradle/CMake wiring for all of it
  • Bytecode compiler toolchain is added that compiles bytecode compiler for hermes, quickjs & primjs, it should be moved to main workflows dir I think though. andorid/.github should be removed.

URL

  • Ada 3.3.0, with URLPattern and URLSearchParams brought up to spec
  • The URLSearchParams iterator now has a single owner and derives its state from the receiver, fixing iteration on both platforms

Runtime correctness

  • Hermes: native callbacks arriving on another thread take the runtime lock before entering the VM, rather than entering it unguarded
  • Hermes: a JavaScript exception can no longer escape the microtask drain into Objective-C
  • JavaScriptCore: the context map is guarded against concurrent access from workers
  • JavaScriptCore: an explicit collection is now a real synchronous one on Android
  • Timers get unique ids, so the stress specs stop timing out

Verified

  • Five Android engines on device: no failures
  • Four macOS engines and the iOS simulator: no failures

Notes for reviewers

  • Sharing one backend per engine means a change to any of them now lands on both platforms at once. That is the point, but it does mean an Apple-only change deserves an Android run, and the reverse.
  • Only one engine is exercised on macOS in CI today. Widening that would catch engine-specific regressions that a single-engine run cannot.

(cherry picked from commit daad6082818715b18bca7f01f24681cb5db8473c)
(cherry picked from commit 516f3220a7a0d26fb6c0520c28d5a84fb44fd289)
…away

(cherry picked from commit 869f7dbf1fd823dc425183e71f79f22cf5bd2d7d)
(cherry picked from commit c92f338dab01e793049f22a3ee5b0c46ba54e830)
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a34ca6ba-aaf0-492c-904d-046fb8270d29

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

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.

@ammarahm-ed ammarahm-ed changed the title Port/android updates on refactor Android Runtime Updates and One Shared Engline Layer Aug 16, 2026
@ammarahm-ed ammarahm-ed changed the title Android Runtime Updates and One Shared Engline Layer Android Runtime Updates and One Shared Engine Layer Aug 16, 2026
@ammarahm-ed ammarahm-ed mentioned this pull request Aug 16, 2026
10 tasks
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.

4 participants