@runanywhere/core 0.16.0

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.
Files changed (354) hide show
  1. package/RunAnywhereCore.podspec +130 -0
  2. package/android/CMakeLists.txt +92 -0
  3. package/android/build.gradle +321 -0
  4. package/android/consumer-rules.pro +5 -0
  5. package/android/src/main/AndroidManifest.xml +3 -0
  6. package/android/src/main/cpp/cpp-adapter.cpp +271 -0
  7. package/android/src/main/include/rac/backends/rac_llm_llamacpp.h +218 -0
  8. package/android/src/main/include/rac/backends/rac_stt_onnx.h +99 -0
  9. package/android/src/main/include/rac/backends/rac_stt_whispercpp.h +153 -0
  10. package/android/src/main/include/rac/backends/rac_tts_onnx.h +71 -0
  11. package/android/src/main/include/rac/backends/rac_vad_onnx.h +84 -0
  12. package/android/src/main/include/rac/core/capabilities/rac_lifecycle.h +290 -0
  13. package/android/src/main/include/rac/core/rac_analytics_events.h +610 -0
  14. package/android/src/main/include/rac/core/rac_audio_utils.h +88 -0
  15. package/android/src/main/include/rac/core/rac_component_types.h +160 -0
  16. package/android/src/main/include/rac/core/rac_core.h +331 -0
  17. package/android/src/main/include/rac/core/rac_error.h +469 -0
  18. package/android/src/main/include/rac/core/rac_events.h +334 -0
  19. package/android/src/main/include/rac/core/rac_logger.h +416 -0
  20. package/android/src/main/include/rac/core/rac_platform_adapter.h +340 -0
  21. package/android/src/main/include/rac/core/rac_sdk_state.h +292 -0
  22. package/android/src/main/include/rac/core/rac_structured_error.h +594 -0
  23. package/android/src/main/include/rac/core/rac_types.h +264 -0
  24. package/android/src/main/include/rac/features/llm/rac_llm.h +17 -0
  25. package/android/src/main/include/rac/features/llm/rac_llm_analytics.h +188 -0
  26. package/android/src/main/include/rac/features/llm/rac_llm_component.h +228 -0
  27. package/android/src/main/include/rac/features/llm/rac_llm_events.h +215 -0
  28. package/android/src/main/include/rac/features/llm/rac_llm_metrics.h +402 -0
  29. package/android/src/main/include/rac/features/llm/rac_llm_service.h +163 -0
  30. package/android/src/main/include/rac/features/llm/rac_llm_structured_output.h +141 -0
  31. package/android/src/main/include/rac/features/llm/rac_llm_types.h +384 -0
  32. package/android/src/main/include/rac/features/platform/rac_llm_platform.h +204 -0
  33. package/android/src/main/include/rac/features/platform/rac_tts_platform.h +197 -0
  34. package/android/src/main/include/rac/features/stt/rac_stt.h +17 -0
  35. package/android/src/main/include/rac/features/stt/rac_stt_analytics.h +204 -0
  36. package/android/src/main/include/rac/features/stt/rac_stt_component.h +162 -0
  37. package/android/src/main/include/rac/features/stt/rac_stt_events.h +62 -0
  38. package/android/src/main/include/rac/features/stt/rac_stt_service.h +154 -0
  39. package/android/src/main/include/rac/features/stt/rac_stt_types.h +389 -0
  40. package/android/src/main/include/rac/features/tts/rac_tts.h +17 -0
  41. package/android/src/main/include/rac/features/tts/rac_tts_analytics.h +181 -0
  42. package/android/src/main/include/rac/features/tts/rac_tts_component.h +158 -0
  43. package/android/src/main/include/rac/features/tts/rac_tts_events.h +54 -0
  44. package/android/src/main/include/rac/features/tts/rac_tts_service.h +162 -0
  45. package/android/src/main/include/rac/features/tts/rac_tts_types.h +374 -0
  46. package/android/src/main/include/rac/features/vad/rac_vad.h +17 -0
  47. package/android/src/main/include/rac/features/vad/rac_vad_analytics.h +236 -0
  48. package/android/src/main/include/rac/features/vad/rac_vad_component.h +185 -0
  49. package/android/src/main/include/rac/features/vad/rac_vad_energy.h +443 -0
  50. package/android/src/main/include/rac/features/vad/rac_vad_events.h +76 -0
  51. package/android/src/main/include/rac/features/vad/rac_vad_service.h +167 -0
  52. package/android/src/main/include/rac/features/vad/rac_vad_types.h +244 -0
  53. package/android/src/main/include/rac/features/voice_agent/rac_voice_agent.h +612 -0
  54. package/android/src/main/include/rac/infrastructure/device/rac_device_manager.h +176 -0
  55. package/android/src/main/include/rac/infrastructure/download/rac_download.h +418 -0
  56. package/android/src/main/include/rac/infrastructure/events/rac_events.h +177 -0
  57. package/android/src/main/include/rac/infrastructure/model_management/rac_model_assignment.h +169 -0
  58. package/android/src/main/include/rac/infrastructure/model_management/rac_model_paths.h +258 -0
  59. package/android/src/main/include/rac/infrastructure/model_management/rac_model_registry.h +357 -0
  60. package/android/src/main/include/rac/infrastructure/model_management/rac_model_strategy.h +374 -0
  61. package/android/src/main/include/rac/infrastructure/model_management/rac_model_types.h +613 -0
  62. package/android/src/main/include/rac/infrastructure/network/rac_api_types.h +335 -0
  63. package/android/src/main/include/rac/infrastructure/network/rac_auth_manager.h +252 -0
  64. package/android/src/main/include/rac/infrastructure/network/rac_dev_config.h +85 -0
  65. package/android/src/main/include/rac/infrastructure/network/rac_endpoints.h +102 -0
  66. package/android/src/main/include/rac/infrastructure/network/rac_environment.h +220 -0
  67. package/android/src/main/include/rac/infrastructure/network/rac_http_client.h +233 -0
  68. package/android/src/main/include/rac/infrastructure/storage/rac_storage_analyzer.h +286 -0
  69. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_manager.h +206 -0
  70. package/android/src/main/include/rac/infrastructure/telemetry/rac_telemetry_types.h +234 -0
  71. package/android/src/main/java/com/margelo/nitro/runanywhere/ArchiveUtility.kt +308 -0
  72. package/android/src/main/java/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfo.kt +229 -0
  73. package/android/src/main/java/com/margelo/nitro/runanywhere/PlatformAdapterBridge.kt +392 -0
  74. package/android/src/main/java/com/margelo/nitro/runanywhere/RunAnywhereCorePackage.kt +28 -0
  75. package/android/src/main/java/com/margelo/nitro/runanywhere/SDKLogger.kt +357 -0
  76. package/android/src/main/java/com/margelo/nitro/runanywhere/SecureStorageManager.kt +147 -0
  77. package/android/src/main/jniLibs/arm64-v8a/libc++_shared.so +0 -0
  78. package/android/src/main/jniLibs/arm64-v8a/libomp.so +0 -0
  79. package/android/src/main/jniLibs/arm64-v8a/librac_commons.so +0 -0
  80. package/android/src/main/jniLibs/arm64-v8a/librunanywhere_jni.so +0 -0
  81. package/cpp/HybridRunAnywhereCore.cpp +2505 -0
  82. package/cpp/HybridRunAnywhereCore.hpp +271 -0
  83. package/cpp/bridges/AuthBridge.cpp +209 -0
  84. package/cpp/bridges/AuthBridge.hpp +157 -0
  85. package/cpp/bridges/DeviceBridge.cpp +257 -0
  86. package/cpp/bridges/DeviceBridge.hpp +155 -0
  87. package/cpp/bridges/DownloadBridge.cpp +299 -0
  88. package/cpp/bridges/DownloadBridge.hpp +197 -0
  89. package/cpp/bridges/EventBridge.cpp +125 -0
  90. package/cpp/bridges/EventBridge.hpp +139 -0
  91. package/cpp/bridges/HTTPBridge.cpp +96 -0
  92. package/cpp/bridges/HTTPBridge.hpp +144 -0
  93. package/cpp/bridges/InitBridge.cpp +1273 -0
  94. package/cpp/bridges/InitBridge.hpp +306 -0
  95. package/cpp/bridges/ModelRegistryBridge.cpp +394 -0
  96. package/cpp/bridges/ModelRegistryBridge.hpp +177 -0
  97. package/cpp/bridges/StorageBridge.cpp +269 -0
  98. package/cpp/bridges/StorageBridge.hpp +172 -0
  99. package/cpp/bridges/TelemetryBridge.cpp +352 -0
  100. package/cpp/bridges/TelemetryBridge.hpp +126 -0
  101. package/ios/.testlocal +0 -0
  102. package/ios/ArchiveUtility.swift +526 -0
  103. package/ios/ArchiveUtilityBridge.m +52 -0
  104. package/ios/AudioDecoder.h +38 -0
  105. package/ios/AudioDecoder.m +162 -0
  106. package/ios/Binaries/RACommons.xcframework/Info.plist +44 -0
  107. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/RACommons.h +67 -0
  108. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_analytics_events.h +610 -0
  109. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_api_types.h +335 -0
  110. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_audio_utils.h +88 -0
  111. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_auth_manager.h +252 -0
  112. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_component_types.h +160 -0
  113. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_core.h +331 -0
  114. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_dev_config.h +85 -0
  115. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_device_manager.h +176 -0
  116. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_download.h +418 -0
  117. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_endpoints.h +102 -0
  118. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_environment.h +220 -0
  119. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_error.h +469 -0
  120. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_events.h +177 -0
  121. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_http_client.h +233 -0
  122. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_lifecycle.h +290 -0
  123. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm.h +17 -0
  124. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
  125. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_component.h +228 -0
  126. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_events.h +215 -0
  127. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
  128. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
  129. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_platform.h +204 -0
  130. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_service.h +163 -0
  131. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
  132. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_llm_types.h +384 -0
  133. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_logger.h +416 -0
  134. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_assignment.h +169 -0
  135. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_paths.h +258 -0
  136. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_registry.h +357 -0
  137. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_strategy.h +374 -0
  138. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_model_types.h +613 -0
  139. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
  140. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_sdk_state.h +292 -0
  141. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
  142. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_structured_error.h +594 -0
  143. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt.h +17 -0
  144. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
  145. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_component.h +162 -0
  146. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_events.h +62 -0
  147. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
  148. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_service.h +154 -0
  149. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_types.h +389 -0
  150. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
  151. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
  152. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
  153. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts.h +17 -0
  154. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
  155. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_component.h +158 -0
  156. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_events.h +54 -0
  157. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
  158. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_platform.h +197 -0
  159. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_service.h +162 -0
  160. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_tts_types.h +374 -0
  161. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_types.h +264 -0
  162. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad.h +17 -0
  163. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
  164. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_component.h +185 -0
  165. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_energy.h +443 -0
  166. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_events.h +76 -0
  167. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
  168. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_service.h +167 -0
  169. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_vad_types.h +244 -0
  170. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Headers/rac_voice_agent.h +612 -0
  171. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Info.plist +11 -0
  172. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/Modules/module.modulemap +5 -0
  173. package/ios/Binaries/RACommons.xcframework/ios-arm64/RACommons.framework/RACommons +0 -0
  174. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/RACommons.h +67 -0
  175. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_analytics_events.h +610 -0
  176. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_api_types.h +335 -0
  177. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_audio_utils.h +88 -0
  178. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_auth_manager.h +252 -0
  179. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_component_types.h +160 -0
  180. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_core.h +331 -0
  181. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_dev_config.h +85 -0
  182. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_device_manager.h +176 -0
  183. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_download.h +418 -0
  184. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_endpoints.h +102 -0
  185. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_environment.h +220 -0
  186. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_error.h +469 -0
  187. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_events.h +177 -0
  188. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_http_client.h +233 -0
  189. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_lifecycle.h +290 -0
  190. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm.h +17 -0
  191. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_analytics.h +188 -0
  192. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_component.h +228 -0
  193. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_events.h +215 -0
  194. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_llamacpp.h +218 -0
  195. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_metrics.h +402 -0
  196. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_platform.h +204 -0
  197. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_service.h +163 -0
  198. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_structured_output.h +141 -0
  199. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_llm_types.h +384 -0
  200. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_logger.h +416 -0
  201. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_assignment.h +169 -0
  202. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_paths.h +258 -0
  203. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_registry.h +357 -0
  204. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_strategy.h +374 -0
  205. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_model_types.h +613 -0
  206. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_platform_adapter.h +340 -0
  207. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_sdk_state.h +292 -0
  208. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_storage_analyzer.h +286 -0
  209. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_structured_error.h +594 -0
  210. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt.h +17 -0
  211. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_analytics.h +204 -0
  212. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_component.h +162 -0
  213. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_events.h +62 -0
  214. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_onnx.h +99 -0
  215. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_service.h +154 -0
  216. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_types.h +389 -0
  217. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_stt_whispercpp.h +153 -0
  218. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_manager.h +206 -0
  219. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_telemetry_types.h +234 -0
  220. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts.h +17 -0
  221. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_analytics.h +181 -0
  222. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_component.h +158 -0
  223. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_events.h +54 -0
  224. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_onnx.h +71 -0
  225. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_platform.h +197 -0
  226. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_service.h +162 -0
  227. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_tts_types.h +374 -0
  228. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_types.h +264 -0
  229. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad.h +17 -0
  230. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_analytics.h +236 -0
  231. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_component.h +185 -0
  232. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_energy.h +443 -0
  233. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_events.h +76 -0
  234. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_onnx.h +84 -0
  235. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_service.h +167 -0
  236. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_vad_types.h +244 -0
  237. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Headers/rac_voice_agent.h +612 -0
  238. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Info.plist +11 -0
  239. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/Modules/module.modulemap +5 -0
  240. package/ios/Binaries/RACommons.xcframework/ios-arm64_x86_64-simulator/RACommons.framework/RACommons +0 -0
  241. package/ios/HybridRunAnywhereDeviceInfo.swift +214 -0
  242. package/ios/KeychainManager.swift +116 -0
  243. package/ios/PlatformAdapter.swift +100 -0
  244. package/ios/PlatformAdapterBridge.h +152 -0
  245. package/ios/PlatformAdapterBridge.m +570 -0
  246. package/ios/RNSDKLoggerBridge.h +41 -0
  247. package/ios/RNSDKLoggerBridge.m +66 -0
  248. package/ios/SDKLogger.swift +329 -0
  249. package/nitro.json +20 -0
  250. package/nitrogen/generated/.gitattributes +1 -0
  251. package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.cpp +257 -0
  252. package/nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.hpp +77 -0
  253. package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfoSpec.kt +106 -0
  254. package/nitrogen/generated/android/kotlin/com/margelo/nitro/runanywhere/runanywherecoreOnLoad.kt +35 -0
  255. package/nitrogen/generated/android/runanywherecore+autolinking.cmake +82 -0
  256. package/nitrogen/generated/android/runanywherecore+autolinking.gradle +27 -0
  257. package/nitrogen/generated/android/runanywherecoreOnLoad.cpp +54 -0
  258. package/nitrogen/generated/android/runanywherecoreOnLoad.hpp +25 -0
  259. package/nitrogen/generated/ios/RunAnywhereCore+autolinking.rb +60 -0
  260. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.cpp +65 -0
  261. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.hpp +197 -0
  262. package/nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Umbrella.hpp +45 -0
  263. package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.mm +43 -0
  264. package/nitrogen/generated/ios/RunAnywhereCoreAutolinking.swift +25 -0
  265. package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.cpp +11 -0
  266. package/nitrogen/generated/ios/c++/HybridRunAnywhereDeviceInfoSpecSwift.hpp +173 -0
  267. package/nitrogen/generated/ios/swift/Func_void_bool.swift +47 -0
  268. package/nitrogen/generated/ios/swift/Func_void_double.swift +47 -0
  269. package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +47 -0
  270. package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
  271. package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec.swift +68 -0
  272. package/nitrogen/generated/ios/swift/HybridRunAnywhereDeviceInfoSpec_cxx.swift +366 -0
  273. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.cpp +92 -0
  274. package/nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.hpp +138 -0
  275. package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.cpp +33 -0
  276. package/nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.hpp +75 -0
  277. package/package.json +76 -0
  278. package/react-native.config.js +14 -0
  279. package/src/Features/VoiceSession/AudioCaptureManager.ts +286 -0
  280. package/src/Features/VoiceSession/AudioPlaybackManager.ts +300 -0
  281. package/src/Features/VoiceSession/VoiceSessionHandle.ts +530 -0
  282. package/src/Features/VoiceSession/index.ts +20 -0
  283. package/src/Features/index.ts +7 -0
  284. package/src/Foundation/Constants/SDKConstants.ts +47 -0
  285. package/src/Foundation/Constants/index.ts +8 -0
  286. package/src/Foundation/DependencyInjection/ServiceContainer.ts +154 -0
  287. package/src/Foundation/DependencyInjection/ServiceRegistry.ts +51 -0
  288. package/src/Foundation/DependencyInjection/index.ts +6 -0
  289. package/src/Foundation/ErrorTypes/ErrorCategory.ts +184 -0
  290. package/src/Foundation/ErrorTypes/ErrorCodes.ts +151 -0
  291. package/src/Foundation/ErrorTypes/ErrorContext.ts +201 -0
  292. package/src/Foundation/ErrorTypes/SDKError.ts +507 -0
  293. package/src/Foundation/ErrorTypes/index.ts +57 -0
  294. package/src/Foundation/Initialization/InitializationPhase.ts +85 -0
  295. package/src/Foundation/Initialization/InitializationState.ts +168 -0
  296. package/src/Foundation/Initialization/index.ts +26 -0
  297. package/src/Foundation/Logging/Destinations/NativeLogBridge.ts +147 -0
  298. package/src/Foundation/Logging/Destinations/SentryDestination.ts +209 -0
  299. package/src/Foundation/Logging/Logger/SDKLogger.ts +232 -0
  300. package/src/Foundation/Logging/Models/LogLevel.ts +36 -0
  301. package/src/Foundation/Logging/Models/LoggingConfiguration.ts +117 -0
  302. package/src/Foundation/Logging/Services/LoggingManager.ts +407 -0
  303. package/src/Foundation/Logging/index.ts +59 -0
  304. package/src/Foundation/Security/DeviceIdentity.ts +92 -0
  305. package/src/Foundation/Security/SecureStorageError.ts +132 -0
  306. package/src/Foundation/Security/SecureStorageKeys.ts +35 -0
  307. package/src/Foundation/Security/SecureStorageService.ts +449 -0
  308. package/src/Foundation/Security/index.ts +17 -0
  309. package/src/Foundation/index.ts +26 -0
  310. package/src/Infrastructure/Events/EventPublisher.ts +165 -0
  311. package/src/Infrastructure/Events/SDKEvent.ts +214 -0
  312. package/src/Infrastructure/Events/index.ts +15 -0
  313. package/src/Infrastructure/index.ts +9 -0
  314. package/src/Public/Events/EventBus.ts +488 -0
  315. package/src/Public/Events/index.ts +8 -0
  316. package/src/Public/Extensions/RunAnywhere+Logging.ts +51 -0
  317. package/src/Public/Extensions/RunAnywhere+Models.ts +392 -0
  318. package/src/Public/Extensions/RunAnywhere+STT.ts +424 -0
  319. package/src/Public/Extensions/RunAnywhere+Storage.ts +151 -0
  320. package/src/Public/Extensions/RunAnywhere+StructuredOutput.ts +316 -0
  321. package/src/Public/Extensions/RunAnywhere+TTS.ts +430 -0
  322. package/src/Public/Extensions/RunAnywhere+TextGeneration.ts +320 -0
  323. package/src/Public/Extensions/RunAnywhere+VAD.ts +359 -0
  324. package/src/Public/Extensions/RunAnywhere+VoiceAgent.ts +225 -0
  325. package/src/Public/Extensions/RunAnywhere+VoiceSession.ts +155 -0
  326. package/src/Public/Extensions/index.ts +126 -0
  327. package/src/Public/RunAnywhere.ts +695 -0
  328. package/src/index.ts +238 -0
  329. package/src/native/NativeRunAnywhereCore.ts +291 -0
  330. package/src/native/NativeRunAnywhereModule.ts +32 -0
  331. package/src/native/index.ts +21 -0
  332. package/src/services/DownloadService.ts +282 -0
  333. package/src/services/FileSystem.ts +810 -0
  334. package/src/services/ModelRegistry.ts +246 -0
  335. package/src/services/Network/APIEndpoints.ts +84 -0
  336. package/src/services/Network/HTTPService.ts +479 -0
  337. package/src/services/Network/NetworkConfiguration.ts +130 -0
  338. package/src/services/Network/TelemetryService.ts +318 -0
  339. package/src/services/Network/index.ts +29 -0
  340. package/src/services/SystemTTSService.ts +130 -0
  341. package/src/services/index.ts +66 -0
  342. package/src/specs/RunAnywhereCore.nitro.ts +627 -0
  343. package/src/specs/RunAnywhereDeviceInfo.nitro.ts +73 -0
  344. package/src/types/LLMTypes.ts +127 -0
  345. package/src/types/STTTypes.ts +124 -0
  346. package/src/types/StructuredOutputTypes.ts +156 -0
  347. package/src/types/TTSTypes.ts +126 -0
  348. package/src/types/VADTypes.ts +70 -0
  349. package/src/types/VoiceAgentTypes.ts +182 -0
  350. package/src/types/enums.ts +258 -0
  351. package/src/types/events.ts +337 -0
  352. package/src/types/external.d.ts +142 -0
  353. package/src/types/index.ts +146 -0
  354. package/src/types/models.ts +579 -0
@@ -0,0 +1,106 @@
1
+ ///
2
+ /// HybridRunAnywhereDeviceInfoSpec.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.runanywhere
9
+
10
+ import androidx.annotation.Keep
11
+ import com.facebook.jni.HybridData
12
+ import com.facebook.proguard.annotations.DoNotStrip
13
+ import com.margelo.nitro.core.Promise
14
+ import com.margelo.nitro.core.HybridObject
15
+
16
+ /**
17
+ * A Kotlin class representing the RunAnywhereDeviceInfo HybridObject.
18
+ * Implement this abstract class to create Kotlin-based instances of RunAnywhereDeviceInfo.
19
+ */
20
+ @DoNotStrip
21
+ @Keep
22
+ @Suppress(
23
+ "KotlinJniMissingFunction", "unused",
24
+ "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
25
+ "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
26
+ )
27
+ abstract class HybridRunAnywhereDeviceInfoSpec: HybridObject() {
28
+ @DoNotStrip
29
+ private var mHybridData: HybridData = initHybrid()
30
+
31
+ init {
32
+ super.updateNative(mHybridData)
33
+ }
34
+
35
+ override fun updateNative(hybridData: HybridData) {
36
+ mHybridData = hybridData
37
+ super.updateNative(hybridData)
38
+ }
39
+
40
+ // Default implementation of `HybridObject.toString()`
41
+ override fun toString(): String {
42
+ return "[HybridObject RunAnywhereDeviceInfo]"
43
+ }
44
+
45
+ // Properties
46
+
47
+
48
+ // Methods
49
+ @DoNotStrip
50
+ @Keep
51
+ abstract fun getDeviceModel(): Promise<String>
52
+
53
+ @DoNotStrip
54
+ @Keep
55
+ abstract fun getOSVersion(): Promise<String>
56
+
57
+ @DoNotStrip
58
+ @Keep
59
+ abstract fun getPlatform(): Promise<String>
60
+
61
+ @DoNotStrip
62
+ @Keep
63
+ abstract fun getTotalRAM(): Promise<Double>
64
+
65
+ @DoNotStrip
66
+ @Keep
67
+ abstract fun getAvailableRAM(): Promise<Double>
68
+
69
+ @DoNotStrip
70
+ @Keep
71
+ abstract fun getCPUCores(): Promise<Double>
72
+
73
+ @DoNotStrip
74
+ @Keep
75
+ abstract fun hasGPU(): Promise<Boolean>
76
+
77
+ @DoNotStrip
78
+ @Keep
79
+ abstract fun hasNPU(): Promise<Boolean>
80
+
81
+ @DoNotStrip
82
+ @Keep
83
+ abstract fun getChipName(): Promise<String>
84
+
85
+ @DoNotStrip
86
+ @Keep
87
+ abstract fun getThermalState(): Promise<Double>
88
+
89
+ @DoNotStrip
90
+ @Keep
91
+ abstract fun getBatteryLevel(): Promise<Double>
92
+
93
+ @DoNotStrip
94
+ @Keep
95
+ abstract fun isCharging(): Promise<Boolean>
96
+
97
+ @DoNotStrip
98
+ @Keep
99
+ abstract fun isLowPowerMode(): Promise<Boolean>
100
+
101
+ private external fun initHybrid(): HybridData
102
+
103
+ companion object {
104
+ protected const val TAG = "HybridRunAnywhereDeviceInfoSpec"
105
+ }
106
+ }
@@ -0,0 +1,35 @@
1
+ ///
2
+ /// runanywherecoreOnLoad.kt
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ package com.margelo.nitro.runanywhere
9
+
10
+ import android.util.Log
11
+
12
+ internal class runanywherecoreOnLoad {
13
+ companion object {
14
+ private const val TAG = "runanywherecoreOnLoad"
15
+ private var didLoad = false
16
+ /**
17
+ * Initializes the native part of "runanywherecore".
18
+ * This method is idempotent and can be called more than once.
19
+ */
20
+ @JvmStatic
21
+ fun initializeNative() {
22
+ if (didLoad) return
23
+ try {
24
+ Log.i(TAG, "Loading runanywherecore C++ library...")
25
+ System.loadLibrary("runanywherecore")
26
+ Log.i(TAG, "Successfully loaded runanywherecore C++ library!")
27
+ didLoad = true
28
+ } catch (e: Error) {
29
+ Log.e(TAG, "Failed to load runanywherecore C++ library! Is it properly installed and linked? " +
30
+ "Is the name correct? (see `CMakeLists.txt`, at `add_library(...)`)", e)
31
+ throw e
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,82 @@
1
+ #
2
+ # runanywherecore+autolinking.cmake
3
+ # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ # https://github.com/mrousavy/nitro
5
+ # Copyright © 2026 Marc Rousavy @ Margelo
6
+ #
7
+
8
+ # This is a CMake file that adds all files generated by Nitrogen
9
+ # to the current CMake project.
10
+ #
11
+ # To use it, add this to your CMakeLists.txt:
12
+ # ```cmake
13
+ # include(${CMAKE_SOURCE_DIR}/../nitrogen/generated/android/runanywherecore+autolinking.cmake)
14
+ # ```
15
+
16
+ # Define a flag to check if we are building properly
17
+ add_definitions(-DBUILDING_RUNANYWHERECORE_WITH_GENERATED_CMAKE_PROJECT)
18
+
19
+ # Enable Raw Props parsing in react-native (for Nitro Views)
20
+ add_definitions(-DRN_SERIALIZABLE_STATE)
21
+
22
+ # Add all headers that were generated by Nitrogen
23
+ include_directories(
24
+ "../nitrogen/generated/shared/c++"
25
+ "../nitrogen/generated/android/c++"
26
+ "../nitrogen/generated/android/"
27
+ )
28
+
29
+ # Add all .cpp sources that were generated by Nitrogen
30
+ target_sources(
31
+ # CMake project name (Android C++ library name)
32
+ runanywherecore PRIVATE
33
+ # Autolinking Setup
34
+ ../nitrogen/generated/android/runanywherecoreOnLoad.cpp
35
+ # Shared Nitrogen C++ sources
36
+ ../nitrogen/generated/shared/c++/HybridRunAnywhereCoreSpec.cpp
37
+ ../nitrogen/generated/shared/c++/HybridRunAnywhereDeviceInfoSpec.cpp
38
+ # Android-specific Nitrogen C++ sources
39
+ ../nitrogen/generated/android/c++/JHybridRunAnywhereDeviceInfoSpec.cpp
40
+ )
41
+
42
+ # From node_modules/react-native/ReactAndroid/cmake-utils/folly-flags.cmake
43
+ # Used in node_modules/react-native/ReactAndroid/cmake-utils/ReactNative-application.cmake
44
+ target_compile_definitions(
45
+ runanywherecore PRIVATE
46
+ -DFOLLY_NO_CONFIG=1
47
+ -DFOLLY_HAVE_CLOCK_GETTIME=1
48
+ -DFOLLY_USE_LIBCPP=1
49
+ -DFOLLY_CFG_NO_COROUTINES=1
50
+ -DFOLLY_MOBILE=1
51
+ -DFOLLY_HAVE_RECVMMSG=1
52
+ -DFOLLY_HAVE_PTHREAD=1
53
+ # Once we target android-23 above, we can comment
54
+ # the following line. NDK uses GNU style stderror_r() after API 23.
55
+ -DFOLLY_HAVE_XSI_STRERROR_R=1
56
+ )
57
+
58
+ # Add all libraries required by the generated specs
59
+ find_package(fbjni REQUIRED) # <-- Used for communication between Java <-> C++
60
+ find_package(ReactAndroid REQUIRED) # <-- Used to set up React Native bindings (e.g. CallInvoker/TurboModule)
61
+ find_package(react-native-nitro-modules REQUIRED) # <-- Used to create all HybridObjects and use the Nitro core library
62
+
63
+ # Link all libraries together
64
+ target_link_libraries(
65
+ runanywherecore
66
+ fbjni::fbjni # <-- Facebook C++ JNI helpers
67
+ ReactAndroid::jsi # <-- RN: JSI
68
+ react-native-nitro-modules::NitroModules # <-- NitroModules Core :)
69
+ )
70
+
71
+ # Link react-native (different prefab between RN 0.75 and RN 0.76)
72
+ if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
73
+ target_link_libraries(
74
+ runanywherecore
75
+ ReactAndroid::reactnative # <-- RN: Native Modules umbrella prefab
76
+ )
77
+ else()
78
+ target_link_libraries(
79
+ runanywherecore
80
+ ReactAndroid::react_nativemodule_core # <-- RN: TurboModules Core
81
+ )
82
+ endif()
@@ -0,0 +1,27 @@
1
+ ///
2
+ /// runanywherecore+autolinking.gradle
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ /// This is a Gradle file that adds all files generated by Nitrogen
9
+ /// to the current Gradle project.
10
+ ///
11
+ /// To use it, add this to your build.gradle:
12
+ /// ```gradle
13
+ /// apply from: '../nitrogen/generated/android/runanywherecore+autolinking.gradle'
14
+ /// ```
15
+
16
+ logger.warn("[NitroModules] 🔥 runanywherecore is boosted by nitro!")
17
+
18
+ android {
19
+ sourceSets {
20
+ main {
21
+ java.srcDirs += [
22
+ // Nitrogen files
23
+ "${project.projectDir}/../nitrogen/generated/android/kotlin"
24
+ ]
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,54 @@
1
+ ///
2
+ /// runanywherecoreOnLoad.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #ifndef BUILDING_RUNANYWHERECORE_WITH_GENERATED_CMAKE_PROJECT
9
+ #error runanywherecoreOnLoad.cpp is not being built with the autogenerated CMakeLists.txt project. Is a different CMakeLists.txt building this?
10
+ #endif
11
+
12
+ #include "runanywherecoreOnLoad.hpp"
13
+
14
+ #include <jni.h>
15
+ #include <fbjni/fbjni.h>
16
+ #include <NitroModules/HybridObjectRegistry.hpp>
17
+
18
+ #include "JHybridRunAnywhereDeviceInfoSpec.hpp"
19
+ #include "HybridRunAnywhereCore.hpp"
20
+ #include <NitroModules/DefaultConstructableObject.hpp>
21
+
22
+ namespace margelo::nitro::runanywhere {
23
+
24
+ int initialize(JavaVM* vm) {
25
+ using namespace margelo::nitro;
26
+ using namespace margelo::nitro::runanywhere;
27
+ using namespace facebook;
28
+
29
+ return facebook::jni::initialize(vm, [] {
30
+ // Register native JNI methods
31
+ margelo::nitro::runanywhere::JHybridRunAnywhereDeviceInfoSpec::registerNatives();
32
+
33
+ // Register Nitro Hybrid Objects
34
+ HybridObjectRegistry::registerHybridObjectConstructor(
35
+ "RunAnywhereCore",
36
+ []() -> std::shared_ptr<HybridObject> {
37
+ static_assert(std::is_default_constructible_v<HybridRunAnywhereCore>,
38
+ "The HybridObject \"HybridRunAnywhereCore\" is not default-constructible! "
39
+ "Create a public constructor that takes zero arguments to be able to autolink this HybridObject.");
40
+ return std::make_shared<HybridRunAnywhereCore>();
41
+ }
42
+ );
43
+ HybridObjectRegistry::registerHybridObjectConstructor(
44
+ "RunAnywhereDeviceInfo",
45
+ []() -> std::shared_ptr<HybridObject> {
46
+ static DefaultConstructableObject<JHybridRunAnywhereDeviceInfoSpec::javaobject> object("com/margelo/nitro/runanywhere/HybridRunAnywhereDeviceInfo");
47
+ auto instance = object.create();
48
+ return instance->cthis()->shared();
49
+ }
50
+ );
51
+ });
52
+ }
53
+
54
+ } // namespace margelo::nitro::runanywhere
@@ -0,0 +1,25 @@
1
+ ///
2
+ /// runanywherecoreOnLoad.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include <jni.h>
9
+ #include <NitroModules/NitroDefines.hpp>
10
+
11
+ namespace margelo::nitro::runanywhere {
12
+
13
+ /**
14
+ * Initializes the native (C++) part of runanywherecore, and autolinks all Hybrid Objects.
15
+ * Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
16
+ * Example:
17
+ * ```cpp (cpp-adapter.cpp)
18
+ * JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
19
+ * return margelo::nitro::runanywhere::initialize(vm);
20
+ * }
21
+ * ```
22
+ */
23
+ int initialize(JavaVM* vm);
24
+
25
+ } // namespace margelo::nitro::runanywhere
@@ -0,0 +1,60 @@
1
+ #
2
+ # RunAnywhereCore+autolinking.rb
3
+ # This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ # https://github.com/mrousavy/nitro
5
+ # Copyright © 2026 Marc Rousavy @ Margelo
6
+ #
7
+
8
+ # This is a Ruby script that adds all files generated by Nitrogen
9
+ # to the given podspec.
10
+ #
11
+ # To use it, add this to your .podspec:
12
+ # ```ruby
13
+ # Pod::Spec.new do |spec|
14
+ # # ...
15
+ #
16
+ # # Add all files generated by Nitrogen
17
+ # load 'nitrogen/generated/ios/RunAnywhereCore+autolinking.rb'
18
+ # add_nitrogen_files(spec)
19
+ # end
20
+ # ```
21
+
22
+ def add_nitrogen_files(spec)
23
+ Pod::UI.puts "[NitroModules] 🔥 RunAnywhereCore is boosted by nitro!"
24
+
25
+ spec.dependency "NitroModules"
26
+
27
+ current_source_files = Array(spec.attributes_hash['source_files'])
28
+ spec.source_files = current_source_files + [
29
+ # Generated cross-platform specs
30
+ "nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
31
+ # Generated bridges for the cross-platform specs
32
+ "nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
33
+ ]
34
+
35
+ current_public_header_files = Array(spec.attributes_hash['public_header_files'])
36
+ spec.public_header_files = current_public_header_files + [
37
+ # Generated specs
38
+ "nitrogen/generated/shared/**/*.{h,hpp}",
39
+ # Swift to C++ bridging helpers
40
+ "nitrogen/generated/ios/RunAnywhereCore-Swift-Cxx-Bridge.hpp"
41
+ ]
42
+
43
+ current_private_header_files = Array(spec.attributes_hash['private_header_files'])
44
+ spec.private_header_files = current_private_header_files + [
45
+ # iOS specific specs
46
+ "nitrogen/generated/ios/c++/**/*.{h,hpp}",
47
+ # Views are framework-specific and should be private
48
+ "nitrogen/generated/shared/**/views/**/*"
49
+ ]
50
+
51
+ current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
52
+ spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
53
+ # Use C++ 20
54
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
55
+ # Enables C++ <-> Swift interop (by default it's only C)
56
+ "SWIFT_OBJC_INTEROP_MODE" => "objcxx",
57
+ # Enables stricter modular headers
58
+ "DEFINES_MODULE" => "YES",
59
+ })
60
+ end
@@ -0,0 +1,65 @@
1
+ ///
2
+ /// RunAnywhereCore-Swift-Cxx-Bridge.cpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #include "RunAnywhereCore-Swift-Cxx-Bridge.hpp"
9
+
10
+ // Include C++ implementation defined types
11
+ #include "HybridRunAnywhereDeviceInfoSpecSwift.hpp"
12
+ #include "RunAnywhereCore-Swift-Cxx-Umbrella.hpp"
13
+ #include <NitroModules/NitroDefines.hpp>
14
+
15
+ namespace margelo::nitro::runanywhere::bridge::swift {
16
+
17
+ // pragma MARK: std::function<void(const std::string& /* result */)>
18
+ Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept {
19
+ auto swiftClosure = RunAnywhereCore::Func_void_std__string::fromUnsafe(swiftClosureWrapper);
20
+ return [swiftClosure = std::move(swiftClosure)](const std::string& result) mutable -> void {
21
+ swiftClosure.call(result);
22
+ };
23
+ }
24
+
25
+ // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
26
+ Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
27
+ auto swiftClosure = RunAnywhereCore::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
28
+ return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
29
+ swiftClosure.call(error);
30
+ };
31
+ }
32
+
33
+ // pragma MARK: std::function<void(double /* result */)>
34
+ Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept {
35
+ auto swiftClosure = RunAnywhereCore::Func_void_double::fromUnsafe(swiftClosureWrapper);
36
+ return [swiftClosure = std::move(swiftClosure)](double result) mutable -> void {
37
+ swiftClosure.call(result);
38
+ };
39
+ }
40
+
41
+ // pragma MARK: std::function<void(bool /* result */)>
42
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
43
+ auto swiftClosure = RunAnywhereCore::Func_void_bool::fromUnsafe(swiftClosureWrapper);
44
+ return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
45
+ swiftClosure.call(result);
46
+ };
47
+ }
48
+
49
+ // pragma MARK: std::shared_ptr<HybridRunAnywhereDeviceInfoSpec>
50
+ std::shared_ptr<HybridRunAnywhereDeviceInfoSpec> create_std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
51
+ RunAnywhereCore::HybridRunAnywhereDeviceInfoSpec_cxx swiftPart = RunAnywhereCore::HybridRunAnywhereDeviceInfoSpec_cxx::fromUnsafe(swiftUnsafePointer);
52
+ return std::make_shared<margelo::nitro::runanywhere::HybridRunAnywhereDeviceInfoSpecSwift>(swiftPart);
53
+ }
54
+ void* NON_NULL get_std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_(std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_ cppType) {
55
+ std::shared_ptr<margelo::nitro::runanywhere::HybridRunAnywhereDeviceInfoSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::runanywhere::HybridRunAnywhereDeviceInfoSpecSwift>(cppType);
56
+ #ifdef NITRO_DEBUG
57
+ if (swiftWrapper == nullptr) [[unlikely]] {
58
+ throw std::runtime_error("Class \"HybridRunAnywhereDeviceInfoSpec\" is not implemented in Swift!");
59
+ }
60
+ #endif
61
+ RunAnywhereCore::HybridRunAnywhereDeviceInfoSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
62
+ return swiftPart.toUnsafe();
63
+ }
64
+
65
+ } // namespace margelo::nitro::runanywhere::bridge::swift
@@ -0,0 +1,197 @@
1
+ ///
2
+ /// RunAnywhereCore-Swift-Cxx-Bridge.hpp
3
+ /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
+ /// https://github.com/mrousavy/nitro
5
+ /// Copyright © 2026 Marc Rousavy @ Margelo
6
+ ///
7
+
8
+ #pragma once
9
+
10
+ // Forward declarations of C++ defined types
11
+ // Forward declaration of `HybridRunAnywhereDeviceInfoSpec` to properly resolve imports.
12
+ namespace margelo::nitro::runanywhere { class HybridRunAnywhereDeviceInfoSpec; }
13
+
14
+ // Forward declarations of Swift defined types
15
+ // Forward declaration of `HybridRunAnywhereDeviceInfoSpec_cxx` to properly resolve imports.
16
+ namespace RunAnywhereCore { class HybridRunAnywhereDeviceInfoSpec_cxx; }
17
+
18
+ // Include C++ defined types
19
+ #include "HybridRunAnywhereDeviceInfoSpec.hpp"
20
+ #include <NitroModules/Promise.hpp>
21
+ #include <NitroModules/PromiseHolder.hpp>
22
+ #include <NitroModules/Result.hpp>
23
+ #include <exception>
24
+ #include <functional>
25
+ #include <memory>
26
+ #include <string>
27
+
28
+ /**
29
+ * Contains specialized versions of C++ templated types so they can be accessed from Swift,
30
+ * as well as helper functions to interact with those C++ types from Swift.
31
+ */
32
+ namespace margelo::nitro::runanywhere::bridge::swift {
33
+
34
+ // pragma MARK: std::shared_ptr<Promise<std::string>>
35
+ /**
36
+ * Specialized version of `std::shared_ptr<Promise<std::string>>`.
37
+ */
38
+ using std__shared_ptr_Promise_std__string__ = std::shared_ptr<Promise<std::string>>;
39
+ inline std::shared_ptr<Promise<std::string>> create_std__shared_ptr_Promise_std__string__() noexcept {
40
+ return Promise<std::string>::create();
41
+ }
42
+ inline PromiseHolder<std::string> wrap_std__shared_ptr_Promise_std__string__(std::shared_ptr<Promise<std::string>> promise) noexcept {
43
+ return PromiseHolder<std::string>(std::move(promise));
44
+ }
45
+
46
+ // pragma MARK: std::function<void(const std::string& /* result */)>
47
+ /**
48
+ * Specialized version of `std::function<void(const std::string&)>`.
49
+ */
50
+ using Func_void_std__string = std::function<void(const std::string& /* result */)>;
51
+ /**
52
+ * Wrapper class for a `std::function<void(const std::string& / * result * /)>`, this can be used from Swift.
53
+ */
54
+ class Func_void_std__string_Wrapper final {
55
+ public:
56
+ explicit Func_void_std__string_Wrapper(std::function<void(const std::string& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::string& /* result */)>>(std::move(func))) {}
57
+ inline void call(std::string result) const noexcept {
58
+ _function->operator()(result);
59
+ }
60
+ private:
61
+ std::unique_ptr<std::function<void(const std::string& /* result */)>> _function;
62
+ } SWIFT_NONCOPYABLE;
63
+ Func_void_std__string create_Func_void_std__string(void* NON_NULL swiftClosureWrapper) noexcept;
64
+ inline Func_void_std__string_Wrapper wrap_Func_void_std__string(Func_void_std__string value) noexcept {
65
+ return Func_void_std__string_Wrapper(std::move(value));
66
+ }
67
+
68
+ // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
69
+ /**
70
+ * Specialized version of `std::function<void(const std::exception_ptr&)>`.
71
+ */
72
+ using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
73
+ /**
74
+ * Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
75
+ */
76
+ class Func_void_std__exception_ptr_Wrapper final {
77
+ public:
78
+ explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
79
+ inline void call(std::exception_ptr error) const noexcept {
80
+ _function->operator()(error);
81
+ }
82
+ private:
83
+ std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
84
+ } SWIFT_NONCOPYABLE;
85
+ Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
86
+ inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
87
+ return Func_void_std__exception_ptr_Wrapper(std::move(value));
88
+ }
89
+
90
+ // pragma MARK: std::shared_ptr<Promise<double>>
91
+ /**
92
+ * Specialized version of `std::shared_ptr<Promise<double>>`.
93
+ */
94
+ using std__shared_ptr_Promise_double__ = std::shared_ptr<Promise<double>>;
95
+ inline std::shared_ptr<Promise<double>> create_std__shared_ptr_Promise_double__() noexcept {
96
+ return Promise<double>::create();
97
+ }
98
+ inline PromiseHolder<double> wrap_std__shared_ptr_Promise_double__(std::shared_ptr<Promise<double>> promise) noexcept {
99
+ return PromiseHolder<double>(std::move(promise));
100
+ }
101
+
102
+ // pragma MARK: std::function<void(double /* result */)>
103
+ /**
104
+ * Specialized version of `std::function<void(double)>`.
105
+ */
106
+ using Func_void_double = std::function<void(double /* result */)>;
107
+ /**
108
+ * Wrapper class for a `std::function<void(double / * result * /)>`, this can be used from Swift.
109
+ */
110
+ class Func_void_double_Wrapper final {
111
+ public:
112
+ explicit Func_void_double_Wrapper(std::function<void(double /* result */)>&& func): _function(std::make_unique<std::function<void(double /* result */)>>(std::move(func))) {}
113
+ inline void call(double result) const noexcept {
114
+ _function->operator()(result);
115
+ }
116
+ private:
117
+ std::unique_ptr<std::function<void(double /* result */)>> _function;
118
+ } SWIFT_NONCOPYABLE;
119
+ Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
120
+ inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
121
+ return Func_void_double_Wrapper(std::move(value));
122
+ }
123
+
124
+ // pragma MARK: std::shared_ptr<Promise<bool>>
125
+ /**
126
+ * Specialized version of `std::shared_ptr<Promise<bool>>`.
127
+ */
128
+ using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
129
+ inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
130
+ return Promise<bool>::create();
131
+ }
132
+ inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
133
+ return PromiseHolder<bool>(std::move(promise));
134
+ }
135
+
136
+ // pragma MARK: std::function<void(bool /* result */)>
137
+ /**
138
+ * Specialized version of `std::function<void(bool)>`.
139
+ */
140
+ using Func_void_bool = std::function<void(bool /* result */)>;
141
+ /**
142
+ * Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
143
+ */
144
+ class Func_void_bool_Wrapper final {
145
+ public:
146
+ explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
147
+ inline void call(bool result) const noexcept {
148
+ _function->operator()(result);
149
+ }
150
+ private:
151
+ std::unique_ptr<std::function<void(bool /* result */)>> _function;
152
+ } SWIFT_NONCOPYABLE;
153
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
154
+ inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
155
+ return Func_void_bool_Wrapper(std::move(value));
156
+ }
157
+
158
+ // pragma MARK: std::shared_ptr<HybridRunAnywhereDeviceInfoSpec>
159
+ /**
160
+ * Specialized version of `std::shared_ptr<HybridRunAnywhereDeviceInfoSpec>`.
161
+ */
162
+ using std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_ = std::shared_ptr<HybridRunAnywhereDeviceInfoSpec>;
163
+ std::shared_ptr<HybridRunAnywhereDeviceInfoSpec> create_std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
164
+ void* NON_NULL get_std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_(std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_ cppType);
165
+
166
+ // pragma MARK: std::weak_ptr<HybridRunAnywhereDeviceInfoSpec>
167
+ using std__weak_ptr_HybridRunAnywhereDeviceInfoSpec_ = std::weak_ptr<HybridRunAnywhereDeviceInfoSpec>;
168
+ inline std__weak_ptr_HybridRunAnywhereDeviceInfoSpec_ weakify_std__shared_ptr_HybridRunAnywhereDeviceInfoSpec_(const std::shared_ptr<HybridRunAnywhereDeviceInfoSpec>& strong) noexcept { return strong; }
169
+
170
+ // pragma MARK: Result<std::shared_ptr<Promise<std::string>>>
171
+ using Result_std__shared_ptr_Promise_std__string___ = Result<std::shared_ptr<Promise<std::string>>>;
172
+ inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::shared_ptr<Promise<std::string>>& value) noexcept {
173
+ return Result<std::shared_ptr<Promise<std::string>>>::withValue(value);
174
+ }
175
+ inline Result_std__shared_ptr_Promise_std__string___ create_Result_std__shared_ptr_Promise_std__string___(const std::exception_ptr& error) noexcept {
176
+ return Result<std::shared_ptr<Promise<std::string>>>::withError(error);
177
+ }
178
+
179
+ // pragma MARK: Result<std::shared_ptr<Promise<double>>>
180
+ using Result_std__shared_ptr_Promise_double___ = Result<std::shared_ptr<Promise<double>>>;
181
+ inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::shared_ptr<Promise<double>>& value) noexcept {
182
+ return Result<std::shared_ptr<Promise<double>>>::withValue(value);
183
+ }
184
+ inline Result_std__shared_ptr_Promise_double___ create_Result_std__shared_ptr_Promise_double___(const std::exception_ptr& error) noexcept {
185
+ return Result<std::shared_ptr<Promise<double>>>::withError(error);
186
+ }
187
+
188
+ // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
189
+ using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
190
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
191
+ return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
192
+ }
193
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
194
+ return Result<std::shared_ptr<Promise<bool>>>::withError(error);
195
+ }
196
+
197
+ } // namespace margelo::nitro::runanywhere::bridge::swift