Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c27a2e0
refactor: organize direct FFI backends
DjDeveloperr May 28, 2026
ff94889
Refactor FFI backend handling and improve build scripts
DjDeveloperr May 29, 2026
808c1b7
fix(ffi/v8): repair direct V8 backend regressions
DjDeveloperr May 29, 2026
365d3a8
refactor(ffi): consolidate v8/jsc/quickjs bridge into ffi/shared/bridge
DjDeveloperr May 29, 2026
bf50191
fix(ffi): NSError-omitted arity in selector groups; defer JS-extended…
DjDeveloperr May 29, 2026
362bc24
fix(ffi): enter runtime scope during block disposal round-trip cleanup
DjDeveloperr May 29, 2026
1bccaa3
fix(ffi): resolve instance methods via metadata host functions
DjDeveloperr May 29, 2026
3134a63
fix(ffi): promote callback function handles to persistent storage
DjDeveloperr May 29, 2026
fb2eacc
fix(ffi): don't mislabel factory results with the calling class
DjDeveloperr May 29, 2026
9c62d78
fix(ffi/jsc,quickjs): bool set override + correct derived dispatch
DjDeveloperr May 29, 2026
722bf38
refactor(ffi/hermes): use shared/bridge; parameterize HostObject::set…
DjDeveloperr May 29, 2026
d1d0118
refactor(ffi): remove unused dispatchPrototypeClassForEngineDerivedRe…
DjDeveloperr May 29, 2026
b181ad1
fix(ffi/quickjs): resolve JS-extend property overrides explicitly
DjDeveloperr May 29, 2026
20ce90f
fix(ffi/quickjs): propagate real JS exception message from Function::…
DjDeveloperr May 29, 2026
8d75140
fix(ffi/hermes): resolve JS-extend property overrides explicitly
DjDeveloperr May 29, 2026
ec5a8c0
fix(runtime): avoid static-destruction-order crash in promise runloop…
DjDeveloperr May 29, 2026
15a6bb9
fix(ffi): run block-disposal round-trip cleanup on the JS thread
DjDeveloperr May 30, 2026
381301a
fix(scripts): package shared/bridge fragments for RN turbomodule
DjDeveloperr May 30, 2026
bec6706
perf(ffi): cache resolved instance-method host functions
DjDeveloperr May 30, 2026
fe9e2ee
perf(ffi): cache prepared ObjC invocation per arg count in method hos…
DjDeveloperr May 30, 2026
b526139
perf(ffi/v8): inline Value storage to eliminate heap allocation per p…
DjDeveloperr May 30, 2026
4c131f4
fix(ffi): re-adopt init result on host object for JS override return-…
DjDeveloperr May 30, 2026
0f07587
perf(ffi/jsc,quickjs): inline Value storage to eliminate heap allocat…
DjDeveloperr May 30, 2026
78a5ff6
perf(ffi): remove method host-fn from interceptor, defer to prototype
DjDeveloperr May 30, 2026
b210509
Revert "perf(ffi): remove method host-fn from interceptor, defer to p…
DjDeveloperr May 30, 2026
08d5153
perf(ffi/v8): move expando cache check to top of interceptor get path
DjDeveloperr May 30, 2026
788aef6
perf(ffi/v8): optimize selector group callback hot path
DjDeveloperr May 30, 2026
1000f70
perf(ffi/v8): switch to kNonMasking interceptor for 42% speedup
DjDeveloperr May 30, 2026
7e1453e
Revert "perf(ffi/v8): switch to kNonMasking interceptor for 42% speedup"
DjDeveloperr May 30, 2026
7083baa
perf(ffi/v8): add kNonMasking template for native object instances
DjDeveloperr May 30, 2026
294ea31
perf(ffi/v8): kNonMasking on native instances - 773ms benchmark
DjDeveloperr May 30, 2026
a6413ef
perf(ffi/v8): fix kNonMasking test failures - 712/713 passing
DjDeveloperr May 30, 2026
20107e6
perf(ffi/v8): fix constructor/superclass resolution with kNonMasking
DjDeveloperr May 30, 2026
aa1b3b1
fix(tests): fix Swift class test for kNonMasking compatibility
DjDeveloperr May 30, 2026
2af50c9
perf(ffi): unified engine-neutral GSD across V8/JSC/QuickJS/Hermes + …
DjDeveloperr May 31, 2026
3946822
perf(ffi/v8): GSD object returns (typed via context) + cache Runtime …
DjDeveloperr May 31, 2026
1ea1617
perf(ffi/v8): memoize dispatch-superclass resolution per receiver cla…
DjDeveloperr May 31, 2026
5fb44da
perf(ffi/v8): raw host-object arg reads + reorder object-return cache…
DjDeveloperr May 31, 2026
10f5ef8
perf(ffi/v8): inline GSD fast path in selector-group callback
DjDeveloperr May 31, 2026
9a8424c
perf(ffi): cache round-trip root object (avoids per-object-return V8 …
DjDeveloperr May 31, 2026
04b02c4
perf(ffi): object-return GSD + UI-dispatch guard for JSC/QuickJS/Herm…
DjDeveloperr May 31, 2026
8372afd
perf(ffi): retrieve round-trip value from strong-handle map (skip red…
DjDeveloperr May 31, 2026
a75d74e
perf(ffi/v8): stack-buffer SEL arg conversion (avoid per-call heap al…
DjDeveloperr May 31, 2026
115e61c
perf(ffi): port cached-Runtime + dispatch-superclass memo to JSC/Quic…
DjDeveloperr May 31, 2026
f39d194
perf(ffi): cache resolved property-getter member per class in instanc…
DjDeveloperr May 31, 2026
ea830e1
perf: optimize engine selector dispatch
DjDeveloperr Jun 1, 2026
b93d636
fix: preserve dynamic property getter selectors
DjDeveloperr Jun 1, 2026
59acbb8
chore: remove generated local artifacts
DjDeveloperr Jun 1, 2026
0372bc1
perf: tighten engine objc dispatch paths
DjDeveloperr Jun 1, 2026
7f2ba16
ci: use junit mode for ios runtime tests
DjDeveloperr Jun 1, 2026
7a267ac
perf: tighten generated objc return fast paths
DjDeveloperr Jun 1, 2026
b5dbe0d
perf: expand objc gsd fast paths
DjDeveloperr Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ jobs:
IOS_BUILD_TIMEOUT_MS: "600000"
IOS_TEST_TIMEOUT_MS: "600000"
IOS_TEST_INACTIVITY_TIMEOUT_MS: "180000"
IOS_TEST_VERBOSE_SPECS: "1"
IOS_LOG_JUNIT: "1"
IOS_SIMCTL_QUERY_TIMEOUT_MS: "10000"
run: npm run test:ios
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ package-lock.json
v8_build
.npmrc
/Frameworks/
/.kiro/
/opencode.json

/llvm/

Expand All @@ -65,11 +67,16 @@ packages/*/types
SwiftBindgen

# Generated Objective-C/C dispatch wrappers
NativeScript/ffi/napi/GeneratedSignatureDispatch.inc
NativeScript/ffi/napi/GeneratedSignatureDispatch.inc.stamp
NativeScript/ffi/*/GeneratedSignatureDispatch.inc
NativeScript/ffi/*/GeneratedSignatureDispatch.inc.stamp
NativeScript/ffi/*/GeneratedGsdSignatureDispatch.inc
NativeScript/ffi/*/GeneratedGsdSignatureDispatch.inc.stamp

# Packaged native framework artifacts
packages/*/NativeScript.xcframework/

# React Native TurboModule package staging
packages/react-native/dist/
packages/react-native/ios/vendor/
packages/react-native/metadata/
packages/react-native/native-api-jsi/
packages/react-native/native-api/
127 changes: 75 additions & 52 deletions NativeScript/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMMON_FLAGS}")
# Arguments
set(TARGET_PLATFORM "macos" CACHE STRING "Target platform for the Objective-C bridge")
set(TARGET_ENGINE "v8" CACHE STRING "Target JS engine for the NativeScript runtime")
set(NS_FFI_BACKEND "auto" CACHE STRING "FFI backend: auto, napi, or direct")
set(NS_FFI_BACKEND "auto" CACHE STRING "FFI backend: auto, napi, v8, jsc, quickjs, or hermes")
set(NS_GSD_BACKEND "auto" CACHE STRING "Generated signature dispatch backend: auto, v8, jsc, quickjs, hermes, napi, or none")
set(METADATA_SIZE 0 CACHE STRING "Size of embedded metadata in bytes")
set(BUILD_CLI_BINARY OFF CACHE BOOL "Build the NativeScript CLI binary")
set(BUILD_MACOS_NODE_API OFF CACHE BOOL "Build the NativeScript macOS Node API dylib")
set_property(CACHE NS_FFI_BACKEND PROPERTY STRINGS auto napi direct)
set_property(CACHE NS_FFI_BACKEND PROPERTY STRINGS auto napi v8 jsc quickjs hermes)
set_property(CACHE NS_GSD_BACKEND PROPERTY STRINGS auto v8 jsc quickjs hermes napi none)

if (BUILD_MACOS_NODE_API)
Expand Down Expand Up @@ -139,36 +139,46 @@ message(STATUS "GENERIC_NAPI = ${GENERIC_NAPI}")
if(NS_FFI_BACKEND STREQUAL "auto")
if(GENERIC_NAPI OR TARGET_ENGINE_NONE)
set(NS_EFFECTIVE_FFI_BACKEND "napi")
elseif(TARGET_ENGINE_HERMES OR TARGET_ENGINE_V8 OR TARGET_ENGINE_JSC OR TARGET_ENGINE_QUICKJS)
set(NS_EFFECTIVE_FFI_BACKEND "direct")
elseif(TARGET_ENGINE_HERMES)
set(NS_EFFECTIVE_FFI_BACKEND "hermes")
elseif(TARGET_ENGINE_V8)
set(NS_EFFECTIVE_FFI_BACKEND "v8")
elseif(TARGET_ENGINE_JSC)
set(NS_EFFECTIVE_FFI_BACKEND "jsc")
elseif(TARGET_ENGINE_QUICKJS)
set(NS_EFFECTIVE_FFI_BACKEND "quickjs")
else()
set(NS_EFFECTIVE_FFI_BACKEND "napi")
endif()
elseif(NS_FFI_BACKEND STREQUAL "napi" OR NS_FFI_BACKEND STREQUAL "direct")
elseif(NS_FFI_BACKEND STREQUAL "napi" OR
NS_FFI_BACKEND STREQUAL "v8" OR
NS_FFI_BACKEND STREQUAL "jsc" OR
NS_FFI_BACKEND STREQUAL "quickjs" OR
NS_FFI_BACKEND STREQUAL "hermes")
set(NS_EFFECTIVE_FFI_BACKEND "${NS_FFI_BACKEND}")
else()
message(FATAL_ERROR "Unknown NS_FFI_BACKEND: ${NS_FFI_BACKEND}")
endif()

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct" AND
if(NOT NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi" AND
(GENERIC_NAPI OR TARGET_ENGINE_NONE OR BUILD_MACOS_NODE_API))
message(FATAL_ERROR "NS_FFI_BACKEND=direct requires an embedded JS runtime build")
message(FATAL_ERROR
"NS_FFI_BACKEND=${NS_EFFECTIVE_FFI_BACKEND} requires an embedded JS runtime build")
endif()

message(STATUS "NS_FFI_BACKEND = ${NS_FFI_BACKEND} (${NS_EFFECTIVE_FFI_BACKEND})")

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct" AND
NOT (NS_GSD_BACKEND STREQUAL "auto" OR NS_GSD_BACKEND STREQUAL "none"))
if(NOT NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi" AND
NOT NS_EFFECTIVE_FFI_BACKEND STREQUAL "${TARGET_ENGINE}")
message(FATAL_ERROR
"NS_GSD_BACKEND is only used by the Node-API FFI backend. "
"Use NS_GSD_BACKEND=auto or none with NS_FFI_BACKEND=direct.")
"NS_FFI_BACKEND=${NS_EFFECTIVE_FFI_BACKEND} requires TARGET_ENGINE=${NS_EFFECTIVE_FFI_BACKEND}")
endif()

message(STATUS "NS_FFI_BACKEND = ${NS_FFI_BACKEND} (${NS_EFFECTIVE_FFI_BACKEND})")

if(NS_GSD_BACKEND STREQUAL "auto")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
set(NS_EFFECTIVE_GSD_BACKEND "none")
else()
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi")
set(NS_EFFECTIVE_GSD_BACKEND "napi")
else()
set(NS_EFFECTIVE_GSD_BACKEND "${NS_EFFECTIVE_FFI_BACKEND}")
endif()
elseif(NS_GSD_BACKEND STREQUAL "v8" OR
NS_GSD_BACKEND STREQUAL "jsc" OR
Expand Down Expand Up @@ -200,13 +210,18 @@ if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi" AND
"NS_FFI_BACKEND=napi is the pure Node-API FFI backend and only supports "
"NS_GSD_BACKEND=napi or none.")
endif()
if(NOT NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi" AND
NS_EFFECTIVE_GSD_BACKEND STREQUAL "napi")
message(FATAL_ERROR
"NS_FFI_BACKEND=${NS_EFFECTIVE_FFI_BACKEND} cannot use NS_GSD_BACKEND=napi. "
"Use the matching engine backend or none.")
endif()

message(STATUS "NS_GSD_BACKEND = ${NS_GSD_BACKEND} (${NS_EFFECTIVE_GSD_BACKEND})")

# Set up sources
include_directories(
./
ffi/shared
../metadata-generator/include
napi/common
libffi/${LIBFFI_BUILD}/include
Expand Down Expand Up @@ -239,33 +254,33 @@ set(FFI_NAPI_SOURCE_FILES
ffi/napi/ClassBuilder.mm
)

set(FFI_DIRECT_SHARED_SOURCE_FILES
ffi/shared/direct/EmbeddedMetadata.mm
set(FFI_ENGINE_SHARED_SOURCE_FILES
ffi/shared/MetadataState.mm
)

set(FFI_HERMES_DIRECT_SOURCE_FILES
${FFI_DIRECT_SHARED_SOURCE_FILES}
ffi/hermes/jsi/NativeApiJsi.mm
set(FFI_HERMES_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
ffi/hermes/NativeApiJsi.mm
)

set(FFI_V8_DIRECT_SOURCE_FILES
${FFI_DIRECT_SHARED_SOURCE_FILES}
set(FFI_V8_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
ffi/v8/NativeApiV8.mm
ffi/v8/NativeApiV8HostObjects.mm
ffi/v8/NativeApiV8Runtime.mm
ffi/v8/NativeApiV8Value.mm
)

set(FFI_JSC_DIRECT_SOURCE_FILES
${FFI_DIRECT_SHARED_SOURCE_FILES}
set(FFI_JSC_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
ffi/jsc/NativeApiJSC.mm
ffi/jsc/NativeApiJSCHostObjects.mm
ffi/jsc/NativeApiJSCRuntime.mm
ffi/jsc/NativeApiJSCValue.mm
)

set(FFI_QUICKJS_DIRECT_SOURCE_FILES
${FFI_DIRECT_SHARED_SOURCE_FILES}
set(FFI_QUICKJS_ENGINE_SOURCE_FILES
${FFI_ENGINE_SHARED_SOURCE_FILES}
ffi/quickjs/NativeApiQuickJSHostObjects.mm
ffi/quickjs/NativeApiQuickJS.mm
ffi/quickjs/NativeApiQuickJSRuntime.mm
Expand Down Expand Up @@ -328,10 +343,10 @@ if(ENABLE_JS_RUNTIME)
napi/v8/SimpleAllocator.cpp
)

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "v8")
set(SOURCE_FILES
${SOURCE_FILES}
${FFI_V8_DIRECT_SOURCE_FILES}
${FFI_V8_ENGINE_SOURCE_FILES}
)
endif()

Expand Down Expand Up @@ -359,10 +374,10 @@ if(ENABLE_JS_RUNTIME)
napi/hermes/jsr.cpp
)

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "hermes")
set(SOURCE_FILES
${SOURCE_FILES}
${FFI_HERMES_DIRECT_SOURCE_FILES}
${FFI_HERMES_ENGINE_SOURCE_FILES}
)
endif()

Expand Down Expand Up @@ -398,10 +413,10 @@ if(ENABLE_JS_RUNTIME)
napi/quickjs/jsr.cpp
)

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "quickjs")
set(SOURCE_FILES
${SOURCE_FILES}
${FFI_QUICKJS_DIRECT_SOURCE_FILES}
${FFI_QUICKJS_ENGINE_SOURCE_FILES}
)
endif()

Expand All @@ -417,10 +432,10 @@ if(ENABLE_JS_RUNTIME)
napi/jsc/jsr.cpp
)

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "jsc")
set(SOURCE_FILES
${SOURCE_FILES}
${FFI_JSC_DIRECT_SOURCE_FILES}
${FFI_JSC_ENGINE_SOURCE_FILES}
)
endif()

Expand Down Expand Up @@ -511,40 +526,48 @@ elseif(TARGET_ENGINE_JSC)
target_compile_definitions(${NAME} PRIVATE TARGET_ENGINE_JSC)
endif()

set(NS_GSD_BACKEND_V8_VALUE 0)
set(NS_GSD_BACKEND_JSC_VALUE 0)
set(NS_GSD_BACKEND_QUICKJS_VALUE 0)
set(NS_GSD_BACKEND_HERMES_VALUE 0)
set(NS_GSD_BACKEND_NAPI_VALUE 0)
set(NS_FFI_BACKEND_DIRECT_VALUE 0)
set(NS_GSD_BACKEND_PREPARED_VALUE 0)
set(NS_FFI_BACKEND_NAPI_VALUE 0)
set(NS_FFI_BACKEND_V8_VALUE 0)
set(NS_FFI_BACKEND_JSC_VALUE 0)
set(NS_FFI_BACKEND_QUICKJS_VALUE 0)
set(NS_FFI_BACKEND_HERMES_VALUE 0)

if(NS_EFFECTIVE_GSD_BACKEND STREQUAL "v8")
set(NS_GSD_BACKEND_V8_VALUE 1)
set(NS_GSD_BACKEND_PREPARED_VALUE 1)
elseif(NS_EFFECTIVE_GSD_BACKEND STREQUAL "jsc")
set(NS_GSD_BACKEND_JSC_VALUE 1)
set(NS_GSD_BACKEND_PREPARED_VALUE 1)
elseif(NS_EFFECTIVE_GSD_BACKEND STREQUAL "quickjs")
set(NS_GSD_BACKEND_QUICKJS_VALUE 1)
set(NS_GSD_BACKEND_PREPARED_VALUE 1)
elseif(NS_EFFECTIVE_GSD_BACKEND STREQUAL "hermes")
set(NS_GSD_BACKEND_HERMES_VALUE 1)
elseif(NS_EFFECTIVE_GSD_BACKEND STREQUAL "napi")
set(NS_GSD_BACKEND_NAPI_VALUE 1)
endif()

if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "direct")
set(NS_FFI_BACKEND_DIRECT_VALUE 1)
elseif(NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi")
if(NS_EFFECTIVE_FFI_BACKEND STREQUAL "napi")
set(NS_FFI_BACKEND_NAPI_VALUE 1)
elseif(NS_EFFECTIVE_FFI_BACKEND STREQUAL "v8")
set(NS_FFI_BACKEND_V8_VALUE 1)
elseif(NS_EFFECTIVE_FFI_BACKEND STREQUAL "jsc")
set(NS_FFI_BACKEND_JSC_VALUE 1)
elseif(NS_EFFECTIVE_FFI_BACKEND STREQUAL "quickjs")
set(NS_FFI_BACKEND_QUICKJS_VALUE 1)
elseif(NS_EFFECTIVE_FFI_BACKEND STREQUAL "hermes")
set(NS_FFI_BACKEND_HERMES_VALUE 1)
endif()

target_compile_definitions(${NAME} PRIVATE
NS_GSD_BACKEND_V8=${NS_GSD_BACKEND_V8_VALUE}
NS_GSD_BACKEND_JSC=${NS_GSD_BACKEND_JSC_VALUE}
NS_GSD_BACKEND_QUICKJS=${NS_GSD_BACKEND_QUICKJS_VALUE}
NS_GSD_BACKEND_HERMES=${NS_GSD_BACKEND_HERMES_VALUE}
NS_GSD_BACKEND_NAPI=${NS_GSD_BACKEND_NAPI_VALUE}
NS_FFI_BACKEND_DIRECT=${NS_FFI_BACKEND_DIRECT_VALUE}
NS_GSD_BACKEND_PREPARED=${NS_GSD_BACKEND_PREPARED_VALUE}
NS_FFI_BACKEND_NAPI=${NS_FFI_BACKEND_NAPI_VALUE}
NS_FFI_BACKEND_V8=${NS_FFI_BACKEND_V8_VALUE}
NS_FFI_BACKEND_JSC=${NS_FFI_BACKEND_JSC_VALUE}
NS_FFI_BACKEND_QUICKJS=${NS_FFI_BACKEND_QUICKJS_VALUE}
NS_FFI_BACKEND_HERMES=${NS_FFI_BACKEND_HERMES_VALUE}
)

set(FRAMEWORK_VERSION_VALUE "${VERSION}")
Expand Down Expand Up @@ -657,13 +680,13 @@ if(TARGET_ENGINE_V8)
# Prefer universal sim slice if present
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64-simulator/libv8_monolith.framework")
if(NOT EXISTS "${V8_SLICE_DIR}")
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64-simulator/libv8_monolith.framework") # fallback
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64-simulator/libv8_monolith.framework")
endif()
elseif(TARGET_PLATFORM STREQUAL "ios")
# Prefer universal sim slice if present
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64/libv8_monolith.framework")
if(NOT EXISTS "${V8_SLICE_DIR}")
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64/libv8_monolith.framework") # fallback
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/ios-arm64/libv8_monolith.framework")
endif()
elseif(TARGET_PLATFORM STREQUAL "visionos-sim")
set(V8_SLICE_DIR "${V8_XCFRAMEWORK}/xrsimulator-arm64/libv8_monolith.framework")
Expand Down
26 changes: 26 additions & 0 deletions NativeScript/ffi/hermes/NativeApiJsi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef NATIVE_API_JSI_H
#define NATIVE_API_JSI_H

#include <jsi/jsi.h>

#include "ffi/shared/NativeApiBackendConfig.h"

namespace nativescript {

using NativeApiJsiScheduler = NativeApiBackendScheduler;
using NativeApiJsiConfig = NativeApiBackendConfig;

facebook::jsi::Object CreateNativeApiJSI(
facebook::jsi::Runtime& runtime,
const NativeApiJsiConfig& config = NativeApiJsiConfig{});

void InstallNativeApiJSI(
facebook::jsi::Runtime& runtime,
const NativeApiJsiConfig& config = NativeApiJsiConfig{});

} // namespace nativescript

extern "C" void NativeScriptInstallNativeApiJSI(
facebook::jsi::Runtime* runtime, const char* metadataPath);

#endif // NATIVE_API_JSI_H
Loading
Loading