@runanywhere/llamacpp 0.16.9 → 0.16.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -35,6 +35,23 @@ add_library(${PACKAGE_NAME} SHARED
35
35
  ${BRIDGE_SOURCES}
36
36
  )
37
37
 
38
+ # =============================================================================
39
+ # Fix NitroModules prefab path for library modules
40
+ # The prefab config generated by AGP has incorrect paths when building library modules
41
+ # We need to create the NitroModules target BEFORE the autolinking.cmake runs
42
+ # =============================================================================
43
+ if(DEFINED REACT_NATIVE_NITRO_BUILD_DIR)
44
+ # Find NitroModules.so in the app's build directory
45
+ set(NITRO_LIBS_DIR "${REACT_NATIVE_NITRO_BUILD_DIR}/intermediates/merged_native_libs/debug/mergeDebugNativeLibs/out/lib/${ANDROID_ABI}")
46
+ if(EXISTS "${NITRO_LIBS_DIR}/libNitroModules.so")
47
+ message(STATUS "[RunAnywhereLlama] Using NitroModules from app build: ${NITRO_LIBS_DIR}")
48
+ add_library(react-native-nitro-modules::NitroModules SHARED IMPORTED)
49
+ set_target_properties(react-native-nitro-modules::NitroModules PROPERTIES
50
+ IMPORTED_LOCATION "${NITRO_LIBS_DIR}/libNitroModules.so"
51
+ )
52
+ endif()
53
+ endif()
54
+
38
55
  # Add Nitrogen specs (this handles all React Native linking)
39
56
  include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/runanywherellama+autolinking.cmake)
40
57
 
@@ -115,7 +115,9 @@ android {
115
115
  externalNativeBuild {
116
116
  cmake {
117
117
  cppFlags "-frtti -fexceptions -Wall -fstack-protector-all"
118
- arguments "-DANDROID_STL=c++_shared"
118
+ arguments "-DANDROID_STL=c++_shared",
119
+ // Fix NitroModules prefab path - use app's build directory
120
+ "-DREACT_NATIVE_NITRO_BUILD_DIR=${rootProject.buildDir}"
119
121
  abiFilters 'arm64-v8a'
120
122
  }
121
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runanywhere/llamacpp",
3
- "version": "0.16.9",
3
+ "version": "0.16.11",
4
4
  "description": "LlamaCpp backend for RunAnywhere React Native SDK - GGUF model support for on-device LLM",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",