Skip to content

Commit aa34aa1

Browse files
Merge remote-tracking branch 'origin/main' into smonga/genie_support_v2-rebase
# Conflicts: # examples/flutter/RunAnywhereAI/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java # examples/flutter/RunAnywhereAI/lib/app/runanywhere_ai_app.dart # examples/flutter/RunAnywhereAI/pubspec.yaml # examples/react-native/RunAnywhereAI/android/app/build.gradle # examples/react-native/RunAnywhereAI/android/app/src/main/java/com/runanywhereaI/MainApplication.kt # examples/react-native/RunAnywhereAI/android/settings.gradle # examples/react-native/RunAnywhereAI/package-lock.json # examples/react-native/RunAnywhereAI/package.json # examples/react-native/RunAnywhereAI/src/screens/RAGScreen.tsx # examples/react-native/RunAnywhereAI/yarn.lock # sdk/runanywhere-commons/src/backends/llamacpp/llamacpp_backend.cpp # sdk/runanywhere-flutter/packages/runanywhere/lib/infrastructure/download/download_service.dart # sdk/runanywhere-flutter/packages/runanywhere/lib/native/dart_bridge_rag.dart # sdk/runanywhere-flutter/packages/runanywhere/lib/public/runanywhere.dart # sdk/runanywhere-flutter/packages/runanywhere/lib/public/types/rag_types.dart # sdk/runanywhere-flutter/packages/runanywhere/lib/runanywhere.dart # sdk/runanywhere-kotlin/src/jvmAndroidMain/kotlin/com/runanywhere/sdk/public/extensions/RunAnywhere+ModelManagement.jvmAndroid.kt # sdk/runanywhere-react-native/packages/core/src/Public/Extensions/RunAnywhere+Models.ts # sdk/runanywhere-react-native/packages/llamacpp/android/CMakeLists.txt
2 parents 1e28a1f + 49279b7 commit aa34aa1

190 files changed

Lines changed: 36889 additions & 5300 deletions

File tree

Some content is hidden

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

Package.resolved

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ let package = Package(
8686
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.0.0"),
8787
.package(url: "https://github.com/Alamofire/Alamofire.git", from: "5.9.0"),
8888
.package(url: "https://github.com/JohnSundell/Files.git", from: "4.3.0"),
89-
.package(url: "https://github.com/weichsel/ZIPFoundation.git", from: "0.9.0"),
9089
.package(url: "https://github.com/devicekit/DeviceKit.git", from: "5.6.0"),
91-
.package(url: "https://github.com/tsolomko/SWCompression.git", from: "4.8.0"),
9290
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.40.0"),
9391
// ml-stable-diffusion for CoreML-based image generation
9492
.package(url: "https://github.com/apple/ml-stable-diffusion.git", from: "1.1.0"),
@@ -139,9 +137,7 @@ let package = Package(
139137
.product(name: "Crypto", package: "swift-crypto"),
140138
.product(name: "Alamofire", package: "Alamofire"),
141139
.product(name: "Files", package: "Files"),
142-
.product(name: "ZIPFoundation", package: "ZIPFoundation"),
143140
.product(name: "DeviceKit", package: "DeviceKit"),
144-
.product(name: "SWCompression", package: "SWCompression"),
145141
.product(name: "Sentry", package: "sentry-cocoa"),
146142
.product(name: "StableDiffusion", package: "ml-stable-diffusion"),
147143
"CRACommons",

Playground/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ A complete on-device voice AI pipeline for Linux (Raspberry Pi 5, x86_64, ARM64)
4242
- **Large Language Model** — Qwen2.5 0.5B Q4 via llama.cpp (fully local)
4343
- **Text-to-Speech** — Piper Lessac Medium neural TTS
4444

45-
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++17
45+
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++20
4646

4747
## swift-starter-app
4848

@@ -94,4 +94,4 @@ A hybrid voice assistant that combines on-device AI inference with cloud LLM rea
9494
- **Barge-in Support** — Wake word during TTS playback cancels speech and re-listens
9595
- **Waiting Chime** — Earcon feedback while waiting for cloud response
9696

97-
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++17
97+
**Requirements:** Linux (ALSA), x86_64 or ARM64, CMake 3.16+, C++20

Playground/linux-voice-assistant/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project(linux-voice-assistant
3131
DESCRIPTION "Linux Voice Assistant using RunAnywhere Commons"
3232
)
3333

34-
set(CMAKE_CXX_STANDARD 17)
34+
set(CMAKE_CXX_STANDARD 20)
3535
set(CMAKE_CXX_STANDARD_REQUIRED ON)
3636

3737
# =============================================================================

Playground/linux-voice-assistant/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ linux-voice-assistant/
5656

5757
- Linux (Raspberry Pi 5, Ubuntu, Debian, etc.)
5858
- CMake 3.16+
59-
- C++17 compiler (g++ or clang++)
59+
- C++20 compiler (g++ or clang++)
6060
- ALSA development headers: `sudo apt install libasound2-dev`
6161

6262
### Build and Run

Playground/openclaw-hybrid-assistant/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22
project(openclaw-hybrid-assistant VERSION 0.1.0 LANGUAGES CXX)
33

4-
set(CMAKE_CXX_STANDARD 17)
4+
set(CMAKE_CXX_STANDARD 20)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

77
# =============================================================================

examples/flutter/RunAnywhereAI/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ public static void registerWith(@NonNull FlutterEngine flutterEngine) {
3030
} catch (Exception e) {
3131
Log.e(TAG, "Error registering plugin device_info_plus, dev.fluttercommunity.plus.device_info.DeviceInfoPlusPlugin", e);
3232
}
33-
try {
34-
flutterEngine.getPlugins().add(new com.mr.flutter.plugin.filepicker.FilePickerPlugin());
35-
} catch (Exception e) {
36-
Log.e(TAG, "Error registering plugin file_picker, com.mr.flutter.plugin.filepicker.FilePickerPlugin", e);
37-
}
3833
try {
3934
flutterEngine.getPlugins().add(new io.flutter.plugins.flutter_plugin_android_lifecycle.FlutterAndroidLifecyclePlugin());
4035
} catch (Exception e) {
@@ -81,14 +76,14 @@ public static void registerWith(@NonNull FlutterEngine flutterEngine) {
8176
Log.e(TAG, "Error registering plugin runanywhere, ai.runanywhere.sdk.RunAnywherePlugin", e);
8277
}
8378
try {
84-
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.genie.GeniePlugin());
79+
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.llamacpp.LlamaCppPlugin());
8580
} catch (Exception e) {
86-
Log.e(TAG, "Error registering plugin runanywhere_genie, ai.runanywhere.sdk.genie.GeniePlugin", e);
81+
Log.e(TAG, "Error registering plugin runanywhere_llamacpp, ai.runanywhere.sdk.llamacpp.LlamaCppPlugin", e);
8782
}
8883
try {
89-
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.llamacpp.LlamaCppPlugin());
84+
flutterEngine.getPlugins().add(new ai.runanywhere.sdk.onnx.OnnxPlugin());
9085
} catch (Exception e) {
91-
Log.e(TAG, "Error registering plugin runanywhere_llamacpp, ai.runanywhere.sdk.llamacpp.LlamaCppPlugin", e);
86+
Log.e(TAG, "Error registering plugin runanywhere_onnx, ai.runanywhere.sdk.onnx.OnnxPlugin", e);
9287
}
9388
try {
9489
flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin());

examples/flutter/RunAnywhereAI/lib/app/runanywhere_ai_app.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import 'package:runanywhere/public/extensions/runanywhere_device.dart';
1515
import 'package:runanywhere/public/extensions/rag_module.dart';
1616
import 'package:runanywhere_llamacpp/runanywhere_llamacpp.dart';
1717
import 'package:runanywhere_genie/runanywhere_genie.dart';
18+
import 'package:runanywhere_onnx/runanywhere_onnx.dart';
1819

1920
/// RunAnywhereAIApp (mirroring iOS RunAnywhereAIApp.swift)
2021
///
@@ -324,6 +325,14 @@ class _RunAnywhereAIAppState extends State<RunAnywhereAIApp> {
324325
debugPrint('✅ ONNX Embedding models registered');
325326
await Future<void>.delayed(Duration.zero);
326327

328+
// --- ONNX BACKEND (required for embeddings used by RAG) ---
329+
try {
330+
await Onnx.register();
331+
debugPrint('✅ ONNX backend registered (STT + TTS + VAD + Embeddings)');
332+
} catch (e) {
333+
debugPrint('⚠️ ONNX backend not available: $e');
334+
}
335+
327336
// --- RAG BACKEND ---
328337
try {
329338
await RAGModule.register();

examples/flutter/RunAnywhereAI/lib/features/vision/vlm_view_model.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class VLMViewModel extends ChangeNotifier {
161161
final result = await sdk.RunAnywhere.processImageStream(
162162
image,
163163
prompt: 'Describe what you see briefly.',
164-
maxTokens: 200,
164+
options: const sdk.VLMGenerationOptions(maxTokens: 200),
165165
);
166166

167167
// Listen to stream and append tokens
@@ -201,7 +201,7 @@ class VLMViewModel extends ChangeNotifier {
201201
final result = await sdk.RunAnywhere.processImageStream(
202202
image,
203203
prompt: 'Describe this image in detail.',
204-
maxTokens: 300,
204+
options: const sdk.VLMGenerationOptions(maxTokens: 300),
205205
);
206206

207207
// Listen to stream and append tokens
@@ -285,7 +285,7 @@ class VLMViewModel extends ChangeNotifier {
285285
final result = await sdk.RunAnywhere.processImageStream(
286286
image,
287287
prompt: 'Describe what you see in one sentence.',
288-
maxTokens: 100,
288+
options: const sdk.VLMGenerationOptions(maxTokens: 100),
289289
);
290290

291291
// Listen to stream and build description

examples/flutter/RunAnywhereAI/pubspec.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ dependencies:
2121
# RunAnywhere SDK - Genie NPU Backend (Android/Snapdragon only)
2222
runanywhere_genie:
2323
path: ../../../sdk/runanywhere-flutter/packages/runanywhere_genie
24+
25+
# RunAnywhere SDK - ONNX Backend (STT/TTS/VAD/Embeddings)
26+
runanywhere_onnx:
27+
path: ../../../sdk/runanywhere-flutter/packages/runanywhere_onnx
2428
provider: ^6.1.0
2529
flutter_markdown: ^0.6.18
2630
record: ^6.1.0
@@ -63,6 +67,8 @@ dependency_overrides:
6367
path: ../../../sdk/runanywhere-flutter/packages/runanywhere
6468
runanywhere_genie:
6569
path: ../../../sdk/runanywhere-flutter/packages/runanywhere_genie
70+
runanywhere_onnx:
71+
path: ../../../sdk/runanywhere-flutter/packages/runanywhere_onnx
6672

6773
flutter:
6874
uses-material-design: true

0 commit comments

Comments
 (0)