File tree Expand file tree Collapse file tree
packages/react-native-executorch Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 " cpp" ,
2323 " scripts" ,
2424 " *.podspec" ,
25- " third-party/include" ,
2625 " third-party" ,
26+ " !third-party/include" ,
2727 " !third-party/android/jniLibs" ,
2828 " !third-party/android/libs" ,
2929 " !third-party/ios/Frameworks" ,
Original file line number Diff line number Diff line change 77 *
88 * Artifact layout on GitHub Releases (per version tag, e.g. v0.9.0):
99 *
10+ * headers.tar.gz -- ExecuTorch + c10 + torch + tokenizers + opencv
11+ * headers (platform-independent; always downloaded)
1012 * core-android-arm64-v8a.tar.gz -- executorch, pthreadpool, cpuinfo for arm64
1113 * core-android-x86_64.tar.gz -- executorch for x86_64
1214 * core-ios.tar.gz -- ExecutorchLib.xcframework (without xnnpack/coreml)
@@ -269,6 +271,11 @@ function detectTargets() {
269271function getArtifacts ( targets , { backends, libs } ) {
270272 const artifacts = [ ] ;
271273
274+ // Headers (ExecuTorch + c10 + torch + tokenizers + opencv) are
275+ // platform-independent and always needed at build time. The tarball contains
276+ // an `include/` dir, so it extracts to third-party/include/.
277+ artifacts . push ( makeArtifact ( 'headers' , THIRD_PARTY_DIR ) ) ;
278+
272279 for ( const target of targets ) {
273280 const destDir = target . startsWith ( 'android' )
274281 ? path . join ( THIRD_PARTY_DIR , 'android' , 'libs' )
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ ANDROID_LIBS="$PACKAGE_ROOT/third-party/android/libs"
5454IOS_DIR=" $PACKAGE_ROOT /third-party/ios"
5555OUT=" $PACKAGE_ROOT /dist-artifacts"
5656
57+ INCLUDE_DIR=" $PACKAGE_ROOT /third-party/include"
5758VERSION=$( node -p " require('$PACKAGE_ROOT /package.json').version" )
5859
5960echo " Packaging release artifacts for v$VERSION "
@@ -137,6 +138,16 @@ package_merged() {
137138 rm -rf " $tmp "
138139}
139140
141+ # ---- Headers ----------------------------------------------------------------
142+ # Platform-independent ExecuTorch + c10 + torch + tokenizers + opencv headers.
143+ # Staged under include/ so the tarball extracts to third-party/include/.
144+
145+ echo " "
146+ echo " Headers:"
147+
148+ package_merged " headers" \
149+ " include" " $INCLUDE_DIR "
150+
140151# ---- Android ----------------------------------------------------------------
141152
142153echo " "
Original file line number Diff line number Diff line change 44# Committed here (source, not per-build binaries):
55# - README.md, this .gitignore
66# - common/ (phonemis submodule, built from source)
7- # - include/ (ExecuTorch + c10 + tokenizer headers — matches main)
87# - ios/ExecutorchLib/ (xcodeproj wrapper that builds ExecutorchLib.xcframework)
98
9+ # --- Headers (ExecuTorch + c10 + tokenizer + opencv) — downloaded, not committed ---
10+ /include /
11+
1012# --- Android: downloaded per-ABI binaries ---
1113/android /jniLibs /
1214/android /libs /executorch /
Original file line number Diff line number Diff line change @@ -5,10 +5,6 @@ Native ExecuTorch artifacts are split into **committed source** and
55
66## Committed to git
77
8- - ` include/ ` — ExecuTorch + c10 + torch headers, including the ` pytorch/tokenizers `
9- headers under ` include/executorch/extension/llm/tokenizers/include ` (used by the
10- nlp/tokenizer extension; the ` tokenizers::HFTokenizer ` symbols resolve from
11- ` libexecutorch ` , which is built with the llm/tokenizers extension).
128- ` ios/ExecutorchLib/ ` — the Xcode project that wraps the prebuilt ExecuTorch
139 static archives into ` ExecutorchLib.xcframework ` (used only when (re)building
1410 the iOS release artifacts).
@@ -25,6 +21,8 @@ read to gate `RNE_ENABLE_*` and link only the requested backends.
2521
2622Extracted layout the podspec / ` android/CMakeLists.txt ` expect:
2723
24+ - ` include/ ` — ExecuTorch + c10 + torch + ` pytorch/tokenizers ` + opencv headers
25+ (from ` headers.tar.gz ` , always downloaded; platform-independent)
2826- ` android/libs/executorch/<abi>/libexecutorch.so ` (+ ` libxnnpack_executorch_backend.so ` ,
2927 ` libvulkan_executorch_backend.so ` when those backends are enabled)
3028- ` android/libs/opencv/<abi>/*.a ` , ` android/libs/opencv-third-party/<abi>/libkleidicv*.a `
You can’t perform that action at this time.
0 commit comments