Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
5e35f97
chore(napi): sync shared Node-API headers and rename napi_runtime
ammarahm-ed Jul 29, 2026
2499da3
feat(android/quickjs): pin engines as submodules and update the napi …
ammarahm-ed Jul 29, 2026
5985d68
feat(android/primjs): update PrimJS and rewrite the napi adapter
ammarahm-ed Jul 29, 2026
e1f3ec2
feat(android/jsc): update JavaScriptCore and add host object support
ammarahm-ed Jul 29, 2026
cdd44af
feat(android/v8): rewrite the host object implementation
ammarahm-ed Jul 29, 2026
b491a9c
feat(hermes): support both Node-API ABIs from one JSR
ammarahm-ed Jul 29, 2026
0c4dfc5
feat(android/jni): port the JNI Node-API interop updates
ammarahm-ed Jul 29, 2026
389056c
feat(android/runtime): port runtime core, native workers and inspector
ammarahm-ed Jul 29, 2026
90e9e86
feat(url): Ada 3.3.0, URLPattern and URLSearchParams spec compliance
ammarahm-ed Jul 29, 2026
7e4e7fd
feat(android): port the Java runtime layer
ammarahm-ed Jul 29, 2026
3bf6e29
build(android): gradle/CMake updates and prebuilt engine binaries
ammarahm-ed Jul 29, 2026
82d1889
test(android): port the test-app suites and build tools
ammarahm-ed Jul 29, 2026
c2dc964
feat(android): bytecode compiler toolchain
ammarahm-ed Jul 29, 2026
b8a0716
fix(napi): declare jsr_ns_runtime where the typedef was lost
ammarahm-ed Jul 29, 2026
0fc3cce
fix(url,android): complete the URLSearchParams port and fix a duplica…
ammarahm-ed Jul 29, 2026
50f173a
fix(hermes): restore js_runtime.h, which the Apple JSR includes
ammarahm-ed Jul 29, 2026
62d9f35
fix(android): unbreak the Hermes build and the last bad CMake definition
ammarahm-ed Jul 29, 2026
5698cdf
fix(android/quickjs): carry napi-ios's WeakRef patch into the submodules
ammarahm-ed Jul 29, 2026
6777d1a
fix(android): resolve Hermes native-lib packaging collisions
ammarahm-ed Jul 29, 2026
87cb71c
fix(android/quickjs): actually record the engines as submodule gitlinks
ammarahm-ed Jul 29, 2026
086d2c4
fix(hermes): give Android its own header set, matching its engine binary
ammarahm-ed Jul 29, 2026
26fc2dd
fix(url): give the URLSearchParams iterator state a single owner
ammarahm-ed Jul 29, 2026
a30d940
fix(url): derive iterator state from the receiver, not the callback data
ammarahm-ed Jul 29, 2026
c61dd91
fix(napi,url): clean up the Apple build and align its URLSearchParams…
ammarahm-ed Jul 30, 2026
397c361
fix(napi/quickjs): repair the Apple QuickJS backend after the header …
ammarahm-ed Jul 30, 2026
5d229b9
chore(android): remove octane benchmark worker
ammarahm-ed Aug 5, 2026
e540802
chore(android): update npm_trusted_release.yml to support android
ammarahm-ed Aug 5, 2026
976dce9
chore(android): cleanup
ammarahm-ed Aug 5, 2026
a3ac360
style: clang-format the engine napi and jsr sources
ammarahm-ed Aug 7, 2026
4622650
fix(apple/quickjs): restore the ObjC FFI sources moved out of ffi/obj…
ammarahm-ed Aug 7, 2026
7742ee6
refactor(napi/hermes): use the napi/common headers instead of the for…
ammarahm-ed Aug 7, 2026
d6809bb
refactor(quickjs): vendor the patched quickjs-ng tree, drop bellard a…
ammarahm-ed Aug 7, 2026
0ef0088
refactor(android/v8): drop the v8-10 and v8-11 engines
ammarahm-ed Aug 7, 2026
8927ff8
docs(android/jsc): record why gc() cannot use the synchronous collector
ammarahm-ed Aug 7, 2026
35717fe
refactor(quickjs): share one backend between Apple and Android on qui…
ammarahm-ed Aug 7, 2026
24b8d9c
refactor(jsc): share one backend between Apple and Android
ammarahm-ed Aug 7, 2026
830f06a
fix(apple/v8): migrate the backend to the V8 14.9 API
ammarahm-ed Aug 8, 2026
884a711
feat(v8): add download_v8.sh for the shared V8 build
ammarahm-ed Aug 8, 2026
2f0248b
build(android): fetch the V8 libs on demand instead of committing them
ammarahm-ed Aug 8, 2026
cf75be7
chore(v8): vendor the shared V8 14.9 public headers
ammarahm-ed Aug 8, 2026
fe651c5
refactor(engines): share the vendored Hermes and V8 headers across Ap…
ammarahm-ed Aug 8, 2026
9a98b93
refactor(v8): merge the Apple and Android V8 backends into one napi/v8
ammarahm-ed Aug 8, 2026
491eeee
build(v8): fetch only the V8 headers the build reaches and require ND…
ammarahm-ed Aug 8, 2026
93ef690
refactor(napi): move each engine's node-api layer under vendor/<engine>
ammarahm-ed Aug 8, 2026
903aafd
build(v8): note the release now ships only the header closure
ammarahm-ed Aug 8, 2026
101ba7e
fix(hermes): stop a JSI exception escaping the microtask drain into ObjC
ammarahm-ed Aug 8, 2026
7789da9
chore(v8): pin release -5 and install the full src-headers closure
ammarahm-ed Aug 8, 2026
266867d
chore(android): drop the unused v8-13 prebuilt libs
ammarahm-ed Aug 8, 2026
6e7a182
fix(android/test-app): give timers unique ids and stop timing out str…
ammarahm-ed Aug 8, 2026
23d150e
fix(jsc): guard the context->env map against concurrent worker access
ammarahm-ed Aug 8, 2026
f05e15d
fix(jsc): make Android gc() a real synchronous collection
ammarahm-ed Aug 8, 2026
47b0f80
fix(react-native): keep the JSR runtime scope out of the RN turbomodu…
ammarahm-ed Aug 8, 2026
c2cf9d3
build(android): fetch the Hermes prebuilts before CMake configures
ammarahm-ed Aug 16, 2026
1297fda
fix(jsc): let a JS prototype property shadow the native one again
ammarahm-ed Aug 16, 2026
480b96b
fix(ffi): stop the backend boundary check flagging the engine JSR tree
ammarahm-ed Aug 16, 2026
bb681ee
fix(android): preserve refactor runtime synchronization
DjDeveloperr Aug 28, 2026
28d40ae
fix(quickjs): use standard Node-API failure statuses
DjDeveloperr Aug 28, 2026
7799ec9
fix(android): restore JNI class metadata flow
DjDeveloperr Aug 28, 2026
56702b4
ci(runtime): isolate stacked engine benchmarks
DjDeveloperr Aug 28, 2026
11a1327
refactor(jsi): start the shared engine layer with the neutral GSD core
ammarahm-ed Jul 30, 2026
371f9c7
refactor(jsi): move the QuickJS engine layer into the shared tree
ammarahm-ed Jul 30, 2026
c6c5866
refactor(jsi): move the V8 engine layer into the shared tree
ammarahm-ed Jul 30, 2026
12d9033
refactor(jsi): move the JavaScriptCore engine layer into the shared tree
ammarahm-ed Jul 30, 2026
d4b62a1
refactor(jsi): share the Hermes contract header and the GSD lookup side
ammarahm-ed Jul 30, 2026
b83c05d
chore(ci): teach the FFI boundary check about the shared jsi tree
ammarahm-ed Jul 30, 2026
ae60da4
fix(react-native): package the shared JSI headers
DjDeveloperr Aug 28, 2026
27302fe
feat(engine): bring the optimised nativescript::engine layer onto the…
ammarahm-ed Aug 4, 2026
905ed48
refactor(android): split the runtime into napi/ and jsi/ trees
ammarahm-ed Aug 4, 2026
f7e64d3
feat(jni/jsi): engine-facing foundation for the jsi JNI bridge
ammarahm-ed Aug 4, 2026
65c4aa6
feat(jni/jsi): object identity, finalizer deferral, exceptions, arg c…
ammarahm-ed Aug 4, 2026
3656ec3
feat(jni/jsi): WeakRef polyfill on the engine native-state slot
ammarahm-ed Aug 4, 2026
8e1926c
build(android): wire the engine:: layer into the jsi runtime
ammarahm-ed Aug 4, 2026
ccacd1c
feat(android/jsi): engine host, runtime spine, and the napi-free subs…
ammarahm-ed Aug 4, 2026
af5229f
feat(android/jsi): JNI entry points, profiler, performance, message-l…
ammarahm-ed Aug 4, 2026
32ded0a
feat(android/jsi): port the module loader
ammarahm-ed Aug 4, 2026
3cb211c
feat(android/jsi): port WorkerWrapper
ammarahm-ed Aug 4, 2026
e6c83f8
feat(android/jsi): port Timers
ammarahm-ed Aug 4, 2026
100c0e2
feat(android/jsi): port Console; compile NativeScript/jsi under -Pbin…
ammarahm-ed Aug 4, 2026
11240c4
build(android/jsi): reconcile the two lanes' boundary contracts
ammarahm-ed Aug 4, 2026
3c813e7
feat(android/jsi): port the conversion layer to engine::
ammarahm-ed Aug 4, 2026
72f8f18
feat(android/jsi): port GlobalHelpers, JSONObjectHelper and MethodCache
ammarahm-ed Aug 4, 2026
877f22a
fix(android/jsi): close the last two runtime<->ffi API gaps
ammarahm-ed Aug 4, 2026
c43af0f
feat(android/jsi): port FieldAccessor and MetadataBuilder
ammarahm-ed Aug 4, 2026
deef1e6
feat(android/jsi): port MetadataNode and CallbackHandlers; the tree l…
ammarahm-ed Aug 4, 2026
d493b29
fix(android/jsi): key per-runtime state on a stable identity, not &rt
ammarahm-ed Aug 4, 2026
4a481d0
fix(android/jsi): two more stale-runtime bugs found on device
ammarahm-ed Aug 4, 2026
9ccc1a4
fix(android/jsi): open the JS scope before reading the worker handle
ammarahm-ed Aug 4, 2026
a4164f7
fix(android/jsi): stop native exceptions escaping host callbacks
ammarahm-ed Aug 4, 2026
26bef6c
fix(android/jsi): reject a plain Worker(...) call; V8-13 reaches napi…
ammarahm-ed Aug 4, 2026
eebc677
fix(android/jsi): release host-object proxy handles at runtime dispose
ammarahm-ed Aug 4, 2026
f8477fd
fix(android/jsi): dispose js_util::Builtins at runtime teardown
ammarahm-ed Aug 4, 2026
010a04e
fix(jsi/quickjs,android/jsi): QuickJS reaches napi parity
ammarahm-ed Aug 4, 2026
19e03d8
fix(jsi/jsc): install the constructor back-pointer on a host construc…
ammarahm-ed Aug 4, 2026
9257604
fix(jsi/jsc): give native state own-property semantics
ammarahm-ed Aug 4, 2026
8041e05
test: skip the url specs where the runtime does not provide the module
ammarahm-ed Aug 4, 2026
1050cd2
fix(android/jsi): own the proxy registry independently of the ObjectM…
ammarahm-ed Aug 4, 2026
37cb16f
fix(jsi/hermes): install the constructor back-pointer on a host const…
ammarahm-ed Aug 4, 2026
6e30760
fix(jsi/quickjs): do not allocate a zero-length own-names table
ammarahm-ed Aug 5, 2026
2927a9c
fix(android/jsi): console printed "true" for every message
ammarahm-ed Aug 5, 2026
274c0aa
perf(android/jsi): build native instances with the non-masking interc…
ammarahm-ed Aug 5, 2026
7d4f797
fix(android/jsi): keep the error type when rebuilding an error from a…
ammarahm-ed Aug 5, 2026
0c95a51
fix(apple): stop crashing at exit on destroyed function-local statics
ammarahm-ed Aug 1, 2026
95eae6c
perf(jsi/quickjs): take the RuntimeState off the holder, not the cont…
ammarahm-ed Aug 5, 2026
b30b9e9
perf(jsi): create and read JS strings without an owning engine handle
ammarahm-ed Aug 5, 2026
b68f852
feat(jsi): hand host objects an array index as an integer
ammarahm-ed Aug 5, 2026
635c2fd
feat(android/jsi): run ahead-of-time bytecode modules
ammarahm-ed Aug 5, 2026
a715546
fix: write the number to a byte or short field, not zero
ammarahm-ed Aug 5, 2026
0ed6cf6
chore(android): cleanup
ammarahm-ed Aug 5, 2026
b53f8f3
docs: point comments at the relocated engine binding paths
ammarahm-ed Aug 9, 2026
fb66c46
fix(jsi): use one stack argument array across the engine layer
ammarahm-ed Aug 16, 2026
f2811f1
fix(jsc): treat advisory gc() as engine behaviour instead of forcing …
ammarahm-ed Aug 16, 2026
847c54c
chore(android): clean rebased native sources
DjDeveloperr Aug 28, 2026
641ae5e
fix(runtime): preserve native engine lane boundaries
DjDeveloperr Aug 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,18 @@ jobs:

- name: Build base CLI
run: |
# Candidate and base can pin different engine releases and CMake
# layouts. Their ignored build/framework outputs must not bleed into
# one another when both revisions are built in this checkout.
rm -rf ./dist/intermediates/macos ./dist/NativeScript.xcframework
case "${ENGINE}" in
v8)
rm -rf ./Frameworks/libv8_monolith.xcframework
;;
hermes)
rm -rf ./Frameworks/hermes.xcframework ./Frameworks/hermes-headers
;;
esac
git checkout --detach "${BASE_SHA}"
git submodule update --init --recursive
npm install
Expand Down
379 changes: 278 additions & 101 deletions .github/workflows/npm_trusted_release.yml

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@ packages/react-native/native-api/

# Rust metadata bundle analyzer build output
metadata-generator/symbol-analyzer/target/

# Prebuilt V8 static libs, fetched by scripts/download_v8.sh rather than
# committed -- they are ~380 MB. The Apple xcframework is already excluded via
# /Frameworks/ above. The shared V8 headers under vendor/v8 ARE tracked: they
# are text, and the build needs them without a network round trip.
/platforms/android/test-app/runtime/src/main/libs/v8/

# V8's internal headers (~27 MB, 2400 files), fetched by download_v8.sh for the
# v8_inspector sources. Unlike vendor/v8/include these are not tracked: they are
# large, entirely unedited, and pinned to the same release as the binaries.
/vendor/v8/src/
/vendor/v8/third_party/

# Prebuilt Hermes libs, fetched by scripts/download_hermes.sh from the same
# release as the Apple xcframework. Committing them let the .so files drift out
# of step with the headers.
/platforms/android/test-app/runtime/src/main/libs/hermes/
139 changes: 75 additions & 64 deletions NativeScript/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
cmake_minimum_required(VERSION 3.15)

# Metadata
project(NativeScript CXX OBJCXX)
# C is required for the quickjs engine sources (quickjs.c, libregexp.c, …) and
# quickjs-api.c. It used to be enabled as a side effect of add_subdirectory()ing
# mimalloc; without it CMake silently drops every .c file from the target and the
# build fails at link with undefined JS_* symbols.
project(NativeScript C CXX OBJCXX)

set(NAME NativeScript)
set(VERSION 0.1.0)
Expand Down Expand Up @@ -111,7 +115,12 @@ elseif(TARGET_ENGINE STREQUAL "v8")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti -stdlib=libc++ -std=c++20 -DTARGET_ENGINE_V8")
elseif(TARGET_ENGINE STREQUAL "quickjs")
set(TARGET_ENGINE_QUICKJS TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++20 -DTARGET_ENGINE_QUICKJS")
# The shared quickjs backend selects between the quickjs-ng and bellard APIs
# with __QJS_NG__ / __QUICKJS_NG__. Only quickjs-ng is vendored now, so both
# platforms must define them or the bellard branches get compiled against an
# ng header (JS_IsArray, JS_FreeValue, … then mismatch on arity).
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__QJS_NG__ -D__QUICKJS_NG__")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++20 -DTARGET_ENGINE_QUICKJS -D__QJS_NG__ -D__QUICKJS_NG__")
elseif(TARGET_ENGINE STREQUAL "jsc")
set(TARGET_ENGINE_JSC TRUE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -std=c++20 -DTARGET_ENGINE_JSC")
Expand Down Expand Up @@ -228,7 +237,7 @@ include_directories(
)

set(FFI_SHARED_SOURCE_FILES
ffi/objc/shared/Tasks.cpp
jsi/shared/Tasks.cpp
)

set(FFI_NAPI_SOURCE_FILES
Expand Down Expand Up @@ -265,26 +274,32 @@ set(FFI_HERMES_ENGINE_SOURCE_FILES

set(FFI_V8_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
# Platform-neutral engine layer, shared with the Android runtime.
jsi/v8/V8HostObjects.cpp
jsi/v8/V8Runtime.cpp
jsi/v8/V8Value.cpp
# Apple-only ObjC bridge on top of it.
ffi/objc/v8/NativeApiV8.mm
ffi/objc/v8/NativeApiV8HostObjects.mm
ffi/objc/v8/NativeApiV8Runtime.mm
ffi/objc/v8/NativeApiV8Value.mm
)

set(FFI_JSC_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
# Platform-neutral engine layer, shared with the Android runtime.
jsi/jsc/JSCHostObjects.cpp
jsi/jsc/JSCRuntime.cpp
jsi/jsc/JSCValue.cpp
# Apple-only ObjC bridge on top of it.
ffi/objc/jsc/NativeApiJSC.mm
ffi/objc/jsc/NativeApiJSCHostObjects.mm
ffi/objc/jsc/NativeApiJSCRuntime.mm
ffi/objc/jsc/NativeApiJSCValue.mm
)

set(FFI_QUICKJS_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
ffi/objc/quickjs/NativeApiQuickJSHostObjects.mm
# Platform-neutral engine layer, shared with the Android runtime.
jsi/quickjs/QuickJSHostObjects.cpp
jsi/quickjs/QuickJSRuntime.cpp
jsi/quickjs/QuickJSValue.cpp
# Apple-only ObjC bridge on top of it.
ffi/objc/quickjs/NativeApiQuickJS.mm
ffi/objc/quickjs/NativeApiQuickJSRuntime.mm
ffi/objc/quickjs/NativeApiQuickJSValue.mm
)

set(SOURCE_FILES
Expand Down Expand Up @@ -336,17 +351,31 @@ if(ENABLE_JS_RUNTIME)
)

if(TARGET_ENGINE_V8)
# V8's headers come from the pinned release via scripts/download_v8.sh, the
# same set Android uses. Both spellings are needed: <v8.h> from the napi
# backend, and "src/inspector/..." from the console/inspector code, which
# spells paths relative to the V8 checkout root.
set(V8_VENDOR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../vendor/v8")
if(NOT EXISTS "${V8_VENDOR_DIR}/src/inspector/v8-console-message.h")
message(FATAL_ERROR
"V8 headers missing at ${V8_VENDOR_DIR}. Run scripts/download_v8.sh.")
endif()

include_directories(
napi/v8
napi/v8/v8_inspector
${V8_VENDOR_DIR}
${V8_VENDOR_DIR}/v8_inspector
${V8_VENDOR_DIR}/include
# V8 14.9's internals include Abseil as <absl/...>.
${V8_VENDOR_DIR}/third_party/abseil-cpp
)

set(SOURCE_FILES
${SOURCE_FILES}
napi/v8/v8-api.cpp
napi/v8/v8-module-loader.cpp
${V8_VENDOR_DIR}/v8-api.cpp
${V8_VENDOR_DIR}/v8-module-loader.cpp
napi/v8/jsr.cpp
napi/v8/SimpleAllocator.cpp
${V8_VENDOR_DIR}/SimpleAllocator.cpp
)

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "v8")
Expand All @@ -357,24 +386,25 @@ if(ENABLE_JS_RUNTIME)
endif()

elseif(TARGET_ENGINE_HERMES)
set(HERMES_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../Frameworks/hermes-headers")
set(HERMES_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../vendor/hermes/include")

include_directories(
napi/hermes
)

if(EXISTS "${HERMES_HEADERS_DIR}/jsi/jsi.h" AND EXISTS "${HERMES_HEADERS_DIR}/hermes/hermes.h")
include_directories(
${HERMES_HEADERS_DIR}
)
else()
include_directories(
napi/hermes/include
napi/hermes/include/hermes
napi/hermes/include/jsi
)
# Fetched by scripts/download_hermes.sh alongside hermes.xcframework, not
# committed -- these headers must match the prebuilt binary, and a stale
# in-tree copy silently compiling against the wrong ABI is worse than a
# missing one.
if(NOT EXISTS "${HERMES_HEADERS_DIR}/jsi/jsi.h")
message(FATAL_ERROR
"Hermes headers missing at ${HERMES_HEADERS_DIR}. Run scripts/download_hermes.sh.")
endif()

include_directories(
${HERMES_HEADERS_DIR}
)

set(SOURCE_FILES
${SOURCE_FILES}
napi/hermes/jsr.cpp
Expand All @@ -388,34 +418,26 @@ if(ENABLE_JS_RUNTIME)
endif()

elseif(TARGET_ENGINE_QUICKJS)
set(MI_BUILD_OBJECT OFF)
set(MI_OVERRIDE OFF)
set(MI_BUILD_SHARED OFF)
set(MI_BUILD_TESTS OFF)

set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")

add_subdirectory(napi/quickjs/mimalloc-dev mimalloc)

include_directories(
napi/quickjs
napi/quickjs/source
${CMAKE_CURRENT_SOURCE_DIR}/../vendor/quickjs/source_ng
napi/common
mimalloc
napi/quickjs/mimalloc-dev/include
)

set(SOURCE_FILES ${SOURCE_FILES}

# quickjs
napi/quickjs/source/cutils.c
napi/quickjs/source/libregexp.c
napi/quickjs/source/libbf.c
napi/quickjs/source/libunicode.c
napi/quickjs/source/quickjs.c
# quickjs-ng, NativeScript-patched, vendored at the repo root and shared
# with the Android build. 0.11.0 replaced libbf with dtoa.
../vendor/quickjs/source_ng/cutils.c
../vendor/quickjs/source_ng/libregexp.c
../vendor/quickjs/source_ng/libunicode.c
../vendor/quickjs/source_ng/quickjs.c
../vendor/quickjs/source_ng/dtoa.c

# napi
napi/quickjs/quickjs-api.c
../vendor/quickjs/quickjs-api.c
napi/quickjs/jsr.cpp
)

Expand All @@ -429,12 +451,12 @@ if(ENABLE_JS_RUNTIME)
elseif(TARGET_ENGINE_JSC)
include_directories(
napi/jsc
napi/jsc/include
../vendor/jsc
napi/common
)

set(SOURCE_FILES ${SOURCE_FILES}
napi/jsc/jsc-api.cpp
../vendor/jsc/jsc-api.cpp
napi/jsc/jsr.cpp
)

Expand Down Expand Up @@ -502,16 +524,13 @@ target_sources(
"NativeScript.h"
)

if(TARGET_ENGINE_V8 AND TARGET_PLATFORM_IOS)
# iOS V8 slices are built with pointer compression enabled. Keep embedder
# build flags in sync to satisfy V8::Initialize() build config checks.
target_compile_definitions(
${NAME}
PRIVATE
V8_COMPRESS_POINTERS
V8_31BIT_SMIS_ON_64BIT_ARCH
)
endif()
# NOTE: the Apple V8 slices are built with v8_enable_pointer_compression=false
# (see scripts/matrix/build-ios.sh in v8-buildscripts), so the embedder must NOT
# declare V8_COMPRESS_POINTERS -- V8::Initialize() aborts on a mismatch in
# either direction. This previously defined it for iOS, which was correct for
# the old 14.3 xcframework but would abort at startup against 14.9. The Android
# slices differ: they leave the gn arg at its default, which is ON for 64-bit.


if(ENABLE_JS_RUNTIME)
target_compile_definitions(${NAME} PRIVATE ENABLE_JS_RUNTIME)
Expand Down Expand Up @@ -742,14 +761,6 @@ elseif(TARGET_PLATFORM_IOS)
)
endif()

if(TARGET_ENGINE_QUICKJS)
target_link_libraries(
${NAME}
PRIVATE
mimalloc-static
)
endif()

if(GENERIC_NAPI)
target_link_options(
${NAME}
Expand Down
Loading
Loading