Android Runtime Updates and One Shared Engine Layer - #67
Draft
ammarahm-ed wants to merge 57 commits into
Draft
Conversation
NAPI_GUARD now logs the failing call, NAPI_CALLBACK_BEGIN_VARGS_FAST is added, and napi_runtime becomes jsr_ns_runtime across every JSR implementation. (cherry picked from commit a09460e)
…adapter The vendored trees become submodules with local changes carried as patches, and the adapter propagates every napi_status and stops clobbering pending errors. (cherry picked from commit c3d6419)
Replaces the adapter with the upstream-shaped one, fixes the napi_post_finalizer argument order, and drains queued jobs only once the stack unwinds. (cherry picked from commit e77e7b1)
Moves to libJavaScriptCore.so, handles symbol-keyed properties, and installs the unhandled promise rejection tracker. (cherry picked from commit ff97a6d)
Replaces the previous implementation with the one from the updates branch, and carries the accompanying inspector changes. (cherry picked from commit 65413f8)
Apple keeps the C++ createNodeApiEnv hook; Android uses the upstream C ABI behind __ANDROID__, which brings it bytecode support. (cherry picked from commit e28db2c)
Adds the finalizer queue, @CriticalNative/@fastNative registration and NAPI_GUARD coverage, keeping the napi-ios constructor and ObjectManager semantics. (cherry picked from commit bb3c5d1)
Workers and messaging move from Java into C++, timers order against the Java MessageQueue, and the inspector serves source maps and worker isolates. (cherry picked from commit 81222af)
keys/values/entries return real iterators and walk entries positionally, the constructor accepts the sequence and record init forms, and URLPattern is added. (cherry picked from commit 6e43706)
DexFactory injects proxies into the app class loader, worker threading moves to C++, and TimerHandler orders timers through the MessageQueue. (cherry picked from commit 91fa40b)
All engines compile as C++20, Hermes .so files are selected by build type, and every test-app prebuilt now goes through Git LFS. (cherry picked from commit 4e553ef)
New URLPattern/URLSearchParams/timer/worker specs, an intent-selected launch mode for MyActivity, and jsparser/metadata-generator fixes. (cherry picked from commit a270791)
Adds tools/bytecode-compiler, its build workflow and docs; build.js enables host objects by default behind a --disable-host-objects escape hatch. (cherry picked from commit 1f725a2)
Two Apple-side consumers pulled the handle in transitively and were left with no declaration after the rename. (cherry picked from commit fefaa8c)
…te status Ports get/getAll/has/delete/append/set onto the WHATWG behaviour, corrects BuildFromSequence and the null init form, and drops a redeclared `status`. (cherry picked from commit 43b053a)
The port deleted it as an Android file, but in napi-ios it is the shared header. (cherry picked from commit 232cfec)
Restores hermes/napi/node_api*.h, and scopes NS_BYTECODE_ENABLED with target_compile_definitions instead of add_compile_definitions. (cherry picked from commit 5cdee09)
Regenerates both patch files with the WeakRef keepalive mechanism (and the VERSION-file drop), and makes setup.js genuinely idempotent. (cherry picked from commit 55d372b)
pickFirst the libc++_shared.so/libfbjni.so copies fbjni duplicates, and null-check castInterface<IHermes> instead of segfaulting. (cherry picked from commit 02c2b29)
Removes the 244 vendored engine files that `git add` staged over the gitlinks. (cherry picked from commit 9ac85a8)
Apple's headers add a createNodeApiEnv vtable slot that the prebuilt libhermesvm.so does not have, which crashed the runtime at startup. (cherry picked from commit d3fabc2)
The external now owns and deletes IterState; the redundant napi_add_finalizer was double-freeing it and crashing QuickJS-NG. (cherry picked from commit 512ebab)
Fixes 11 PrimJS "Illegal invocation" failures: the brand check relied on a pointer surviving a round trip through two unrelated Node-API mechanisms. (cherry picked from commit ec318b9)
… specs Guard the NAPI_VERSION redefinitions, iterate GetAll as uint32_t, and assert the WHATWG iterator/null behaviour the Android suite already expects. (cherry picked from commit 7d6a01a)
…sync Map the two dropped custom status codes onto their upstream equivalents and cast at the escapable-scope boundary, the way the Android backend already does. (cherry picked from commit f54acac)
(cherry picked from commit 11fb191)
(cherry picked from commit b86695e)
(cherry picked from commit 576719d)
(cherry picked from commit f3d0e81)
…c/quickjs (cherry picked from commit 2b6c9ea)
…nd mimalloc (cherry picked from commit 442d098)
(cherry picked from commit 8a23b3d)
(cherry picked from commit ce33b79)
…ckjs-ng 0.11.0 (cherry picked from commit 0cdbec7)
(cherry picked from commit 39a1e6e)
(cherry picked from commit f99795f)
(cherry picked from commit f5c5855)
(cherry picked from commit 6dd09a3)
(cherry picked from commit 11a71e0)
…ple and Android (cherry picked from commit a94ced2)
(cherry picked from commit 0d2b946)
…K r29 (cherry picked from commit 53135f4)
(cherry picked from commit 3f5c673)
(cherry picked from commit 2f20a95)
(cherry picked from commit 957f1f3)
(cherry picked from commit b7b745d)
(cherry picked from commit d4e2f34)
(cherry picked from commit 130c728)
…ess specs (cherry picked from commit eff805d)
(cherry picked from commit 0fec65b)
(cherry picked from commit 1c68fc5)
…le build (cherry picked from commit 6cc2d23)
(cherry picked from commit daad6082818715b18bca7f01f24681cb5db8473c)
(cherry picked from commit 516f3220a7a0d26fb6c0520c28d5a84fb44fd289)
…away (cherry picked from commit 869f7dbf1fd823dc425183e71f79f22cf5bd2d7d)
(cherry picked from commit c92f338dab01e793049f22a3ee5b0c46ba54e830)
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 & AndroidWhat changed
One engine layer for both platforms
mimallocis also removed as it stopped making a performance difference in latest quickjs engines.Android runtime
andorid/.githubshould be removed.URL
Runtime correctness
Verified
Notes for reviewers