Skip to content

Commit 3df12b7

Browse files
feat: add C++ JSI interface and Executorch dependency (#346)
## Description Add C++ JSI interface and Executorch dependency for Android and iOS. For Android: - Add CMake integration for building C++ code. - Add JSI installer that is called from Kotlin via JNI. - Add Executorch C++ dependency by a dynamic library extracted from the .aar provided by an Executorch script. For iOS: - Add JSI installer in Objective C++. - Modify the podspec to statically link Executorch. The binaries are extracted from the xcframeworks provided by an Executorch script. Port style transfer and image segmentation to C++ for iOS/Android. ### Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update (improves or adds clarity to existing documentation) ### Tested on - [x] iOS - [x] Android ### Checklist - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings --------- Co-authored-by: Mateusz Sluszniak <[email protected]>
1 parent fe7f78b commit 3df12b7

File tree

644 files changed

+143172
-1493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

644 files changed

+143172
-1493
lines changed

apps/computer-vision/ios/Podfile.lock

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ PODS:
7070
- hermes-engine (0.79.2):
7171
- hermes-engine/Pre-built (= 0.79.2)
7272
- hermes-engine/Pre-built (0.79.2)
73-
- opencv-rne (0.1.0)
73+
- opencv-rne (4.11.0)
7474
- RCT-Folly (2024.11.18.00):
7575
- boost
7676
- DoubleConversion
@@ -1399,7 +1399,7 @@ PODS:
13991399
- DoubleConversion
14001400
- glog
14011401
- hermes-engine
1402-
- opencv-rne (~> 0.1.0)
1402+
- opencv-rne (~> 4.11.0)
14031403
- RCT-Folly (= 2024.11.18.00)
14041404
- RCTRequired
14051405
- RCTTypeSafety
@@ -1419,6 +1419,7 @@ PODS:
14191419
- ReactCodegen
14201420
- ReactCommon/turbomodule/bridging
14211421
- ReactCommon/turbomodule/core
1422+
- sqlite3
14221423
- Yoga
14231424
- react-native-image-picker (7.2.3):
14241425
- DoubleConversion
@@ -2041,6 +2042,9 @@ PODS:
20412042
- ReactCommon/turbomodule/core
20422043
- Yoga
20432044
- SocketRocket (0.7.1)
2045+
- sqlite3 (3.49.2):
2046+
- sqlite3/common (= 3.49.2)
2047+
- sqlite3/common (3.49.2)
20442048
- Yoga (0.0.0)
20452049

20462050
DEPENDENCIES:
@@ -2134,6 +2138,7 @@ SPEC REPOS:
21342138
trunk:
21352139
- opencv-rne
21362140
- SocketRocket
2141+
- sqlite3
21372142

21382143
EXTERNAL SOURCES:
21392144
boost:
@@ -2319,7 +2324,7 @@ SPEC CHECKSUMS:
23192324
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
23202325
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
23212326
hermes-engine: 314be5250afa5692b57b4dd1705959e1973a8ebe
2322-
opencv-rne: 63e933ae2373fc91351f9a348dc46c3f523c2d3f
2327+
opencv-rne: 2305807573b6e29c8c87e3416ab096d09047a7a0
23232328
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
23242329
RCTDeprecation: 83ffb90c23ee5cea353bd32008a7bca100908f8c
23252330
RCTRequired: eb7c0aba998009f47a540bec9e9d69a54f68136e
@@ -2351,7 +2356,7 @@ SPEC CHECKSUMS:
23512356
React-logger: 8edfcedc100544791cd82692ca5a574240a16219
23522357
React-Mapbuffer: c3f4b608e4a59dd2f6a416ef4d47a14400194468
23532358
React-microtasksnativemodule: 054f34e9b82f02bd40f09cebd4083828b5b2beb6
2354-
react-native-executorch: 6939375a7c6c4095724675cfd86a7f9c2efdbaa2
2359+
react-native-executorch: 30047a5076fa3c91119618147627d895d87af51b
23552360
react-native-image-picker: 8a3f16000e794f5381a7fe47bb48fd8d06741e47
23562361
react-native-safe-area-context: 562163222d999b79a51577eda2ea8ad2c32b4d06
23572362
react-native-skia: b6cb66e99a953dae6880348c92cfb20a76d90b4f
@@ -2389,6 +2394,7 @@ SPEC CHECKSUMS:
23892394
RNReanimated: afd6a269a47d6f13ba295c46c6c0e14e3cbd0d8a
23902395
RNSVG: 794f269526df9ddc1f79b3d1a202b619df0368e3
23912396
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
2397+
sqlite3: 3c950dc86011117c307eb0b28c4a7bb449dce9f1
23922398
Yoga: c758bfb934100bb4bf9cbaccb52557cee35e8bdf
23932399

23942400
PODFILE CHECKSUM: 12be54799a0524303b792fe9e93fedb70ce87ef7

apps/computer-vision/screens/ImageSegmentationScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { BottomBar } from '../components/BottomBar';
33
import { getImage } from '../utils';
44
import {
55
useImageSegmentation,
6-
DeeplabLabel,
76
DEEPLAB_V3_RESNET50,
7+
DeeplabLabel,
88
} from 'react-native-executorch';
99
import {
1010
Canvas,

apps/llm/ios/Podfile.lock

Lines changed: 244 additions & 238 deletions
Large diffs are not rendered by default.

apps/llm/ios/llm.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@
470470
"$(inherited)",
471471
" ",
472472
);
473-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
473+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
474474
SDKROOT = iphoneos;
475475
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
476476
USE_HERMES = true;
@@ -528,7 +528,7 @@
528528
"$(inherited)",
529529
" ",
530530
);
531-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
531+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
532532
SDKROOT = iphoneos;
533533
USE_HERMES = true;
534534
VALIDATE_PRODUCT = YES;

apps/speech-to-text/ios/Podfile.lock

Lines changed: 246 additions & 240 deletions
Large diffs are not rendered by default.

apps/speech-to-text/ios/speechtotext.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@
457457
"$(inherited)",
458458
" ",
459459
);
460-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
460+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
461461
SDKROOT = iphoneos;
462462
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
463463
USE_HERMES = true;
@@ -515,7 +515,7 @@
515515
"$(inherited)",
516516
" ",
517517
);
518-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
518+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
519519
SDKROOT = iphoneos;
520520
USE_HERMES = true;
521521
VALIDATE_PRODUCT = YES;

apps/text-embeddings/ios/Podfile.lock

Lines changed: 225 additions & 219 deletions
Large diffs are not rendered by default.

apps/text-embeddings/ios/textembeddings.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@
451451
"$(inherited)",
452452
" ",
453453
);
454-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
454+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
455455
SDKROOT = iphoneos;
456456
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
457457
USE_HERMES = true;
@@ -509,7 +509,7 @@
509509
"$(inherited)",
510510
" ",
511511
);
512-
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
512+
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
513513
SDKROOT = iphoneos;
514514
USE_HERMES = true;
515515
VALIDATE_PRODUCT = YES;
694 KB
Binary file not shown.
694 KB
Binary file not shown.

0 commit comments

Comments
 (0)