Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
549f365
feat(v2): bootstrap RunAnywhere v2 architecture (core + engines + sol…
sanchitmonga22 Apr 19, 2026
c768c20
fix(v2): CI failures — ungitignore tools/, pure-dart pubspec, soft pr…
sanchitmonga22 Apr 19, 2026
83b62bf
fix(ci): FetchContent gtest on hosts without a system install
sanchitmonga22 Apr 19, 2026
1d66434
fix(v2): address CodeRabbit review — ABI + scheduler + build-script p…
sanchitmonga22 Apr 19, 2026
64df64e
fix(v2): complete install/export tree — find_package(RunAnywhere) now…
sanchitmonga22 Apr 19, 2026
a3fc998
fix(v2): four more CodeRabbit correctness fixes
sanchitmonga22 Apr 19, 2026
d4f886b
fix(v2): reject RingBuffer capacities that overflow power-of-two roun…
sanchitmonga22 Apr 19, 2026
938f2e5
fix(v2): validate --iterations and align push/PR path filters
sanchitmonga22 Apr 19, 2026
025cca9
fix(v2): PluginRegistry returns ref-counted handles (UAF-proof)
sanchitmonga22 Apr 19, 2026
c3060a0
fix(v2): StreamEdge lifetime guard against CancelToken UAF
sanchitmonga22 Apr 19, 2026
4bc75c7
fix(v2): wire-format + ES-module + WASM exports
sanchitmonga22 Apr 19, 2026
83d605c
chore(v2): drop unused WebWorker lib from web tsconfig
sanchitmonga22 Apr 19, 2026
8489032
fix(v2): narrow EdgeConfig.capacity to uint32 + reject zero at Stream…
sanchitmonga22 Apr 19, 2026
ca7a929
test(rag): BM25 + HybridRetriever unit tests (13 new cases, all green…
sanchitmonga22 Apr 19, 2026
ae752a0
test(core): StreamEdge back-pressure + multi-producer stress suite
sanchitmonga22 Apr 19, 2026
1a6e569
fix(voice-pipeline): atomic session pointers + 4 integration tests (T…
sanchitmonga22 Apr 19, 2026
77f6bcd
feat(idl): wire protoc codegen; proto3 roundtrip tests green (7 cases)
sanchitmonga22 Apr 19, 2026
786d171
feat(ci): benchmark threshold gate + sanitizer suppression scaffolds
sanchitmonga22 Apr 19, 2026
faa737e
fix(plugin): export ra_plugin_entry past -fvisibility=hidden; dynamic…
sanchitmonga22 Apr 19, 2026
00db21a
chore(frontends): dart lint pass + lockfile pins for ts/web
sanchitmonga22 Apr 19, 2026
f687470
feat(bench): --plugin-dir + --json-out flags close the threshold-gate…
sanchitmonga22 Apr 19, 2026
be6bc88
test(router): HardwareProfile detection tests (5 cases, Apple-gated)
sanchitmonga22 Apr 19, 2026
288b742
test(registry): plugin lifecycle + concurrent reader/writer stress (4…
sanchitmonga22 Apr 19, 2026
241b404
test(loader): load all 3 engine plugins side-by-side (cross-engine sa…
sanchitmonga22 Apr 19, 2026
b6f37c1
feat(validator): ra_validate parses PipelineSpec and runs 3 real checks
sanchitmonga22 Apr 19, 2026
67d36a7
fix(hw-profile): populate cpu_isa on Linux / Android (Linux CI was red)
sanchitmonga22 Apr 19, 2026
5794515
test(sentence-detector): 5 new edge-case cases (! / ? / chain / force…
sanchitmonga22 Apr 19, 2026
239a08e
test(router): 4 new cases — pin/format/primitive mismatch, accelerato…
sanchitmonga22 Apr 19, 2026
7e15d31
test(abi): status-string + version lookup coverage (5 cases)
sanchitmonga22 Apr 19, 2026
cab2a5e
feat(llamacpp): REAL llama.cpp inference — no stubs; live GGUF tests …
sanchitmonga22 Apr 19, 2026
d109a64
feat(sherpa): REAL sherpa-onnx STT/TTS/VAD/KWS wrapping — no stubs
sanchitmonga22 Apr 19, 2026
b43a742
feat(downloader): REAL libcurl-backed synchronous model fetch — no stubs
sanchitmonga22 Apr 19, 2026
15e66c5
feat(release): VERSIONS + build-all/verify-versions scaffolding
sanchitmonga22 Apr 19, 2026
b0d8aa6
feat(release): v2 release workflow + pre-commit hooks
sanchitmonga22 Apr 19, 2026
0982919
feat(precommit): v2 core + frontend hooks (versions, clang-format, lint)
sanchitmonga22 Apr 19, 2026
ce5462f
test(sherpa): 5 live tests (path rejection + env-gated real model paths)
sanchitmonga22 Apr 19, 2026
5af6b18
fix(ci): install libcurl + openssl on cpp-linux runner
sanchitmonga22 Apr 19, 2026
9c28256
refactor(engines): delete stub wakeword engine — sherpa plugin now se…
sanchitmonga22 Apr 19, 2026
6a22dd2
refactor(sherpa): switch TTS to non-deprecated GenerateWithConfig API
sanchitmonga22 Apr 19, 2026
efe65aa
fix(ci): missing <cmath> / <algorithm> / <utility> in sherpa_live_tes…
sanchitmonga22 Apr 19, 2026
667602c
fix(ci): explicit link to OpenSSL::Crypto on non-Apple hosts
sanchitmonga22 Apr 19, 2026
e3b410a
feat(core): close audit gaps — HTTP client, env/auth, audio utils, er…
sanchitmonga22 Apr 19, 2026
c94097f
refactor: drop "v2" naming from frontend packages — it's just "core" now
sanchitmonga22 Apr 19, 2026
7459ef5
docs: force-add comprehensive plan tree under thoughts/ (was gitignored)
sanchitmonga22 Apr 19, 2026
97b0ea7
feat(net): telemetry queue — ports rac_telemetry_manager capability
sanchitmonga22 Apr 19, 2026
54b8694
feat(scripts): build-core-xcframework.sh — unlocks Swift SDK migration
sanchitmonga22 Apr 19, 2026
c3e095f
feat(abi): rac_compat.h — maps legacy rac_* call sites onto new ra_* ABI
sanchitmonga22 Apr 19, 2026
25fd767
feat(abi): ra_lifecycle.{h,c} — 8-state component lifecycle enum
sanchitmonga22 Apr 19, 2026
a949c03
feat(abi): rac_compat.c — export rac_* wrapper symbols alongside ra_*
sanchitmonga22 Apr 19, 2026
5485984
feat(scripts): xcframework now bundles core + solutions + llamacpp en…
sanchitmonga22 Apr 19, 2026
7c154a2
feat(util): extraction module — libarchive-backed ZIP/TAR unpacker wi…
sanchitmonga22 Apr 19, 2026
7b25b16
feat(util): file_manager + storage_analyzer — std::filesystem wrappers
sanchitmonga22 Apr 19, 2026
e2e1279
feat(abi): ra_pipeline struct ABI + Swift SDK wiring
sanchitmonga22 Apr 19, 2026
e0e1675
feat(core): racommons_core shared library + Dart FFI bindings
sanchitmonga22 Apr 19, 2026
5fc1110
feat(kotlin): JNI bridge wired onto racommons_core shared lib
sanchitmonga22 Apr 19, 2026
266cd70
feat(ts,web): native-bindings registration protocol for RN + WASM
sanchitmonga22 Apr 19, 2026
262058d
ci(v2-core): build xcframework in CI + libarchive deps
sanchitmonga22 Apr 19, 2026
cf3e928
feat(model): LoRA registry + model compatibility checks
sanchitmonga22 Apr 19, 2026
bac5446
fix(ci): clear -Werror warnings in file_manager/extraction + dart lint
sanchitmonga22 Apr 19, 2026
8562808
docs(v2): current_state snapshot with wired-vs-stubbed rundown
sanchitmonga22 Apr 19, 2026
8e10111
feat(util): tool-calling output parser for DEFAULT + LFM2 formats
sanchitmonga22 Apr 19, 2026
f08e363
feat(util): structured_output — JSON extraction from prose-mixed LLM …
sanchitmonga22 Apr 19, 2026
52a989e
feat(util): energy_vad — ML-free VAD with calibration + TTS suppression
sanchitmonga22 Apr 19, 2026
b388b6d
feat(util): llm_metrics — streaming TTFT + tokens/sec collector
sanchitmonga22 Apr 19, 2026
9e69a44
feat(net): AuthManager — access/refresh tokens, device registration s…
sanchitmonga22 Apr 19, 2026
9ad9a56
docs(v2): update state snapshot — 136/136 tests, 8 capability ports, …
sanchitmonga22 Apr 19, 2026
dca3d3e
build(xcframework): skip sherpa engine — fetches 30 MB tarball that 5…
sanchitmonga22 Apr 19, 2026
e8f9b40
feat(examples): swift-demo + kotlin-demo + dart-demo — end-to-end proof
sanchitmonga22 Apr 19, 2026
2411147
feat(examples): ts-demo — Node CLI via NativePipelineBindings injection
sanchitmonga22 Apr 19, 2026
33c6664
feat(examples): web-demo — browser/Node via WasmCoreModule injection
sanchitmonga22 Apr 19, 2026
e1a1a6d
ci(demos): all 5 demos run end-to-end in CI
sanchitmonga22 Apr 19, 2026
452a78a
docs(v2): final state snapshot — 7/7 CI + 5 end-to-end demos
sanchitmonga22 Apr 19, 2026
040b890
build(core): make libcurl / libarchive / rac_compat optional — unlock…
sanchitmonga22 Apr 19, 2026
26c96b3
build(xcframework): iOS device + simulator slices land alongside macOS
sanchitmonga22 Apr 19, 2026
9dfde09
ci(android,ios): matrix build for NDK .so + multi-slice xcframework
sanchitmonga22 Apr 19, 2026
1ffed7e
fix(ios): guard kEntrySymbol under !RA_STATIC_PLUGINS
sanchitmonga22 Apr 19, 2026
83c415e
docs(v2): final state snapshot — 11/11 CI jobs green, 8 platforms
sanchitmonga22 Apr 19, 2026
f853e0b
ci(release): v2-release workflow now ships full cross-platform artifa…
sanchitmonga22 Apr 19, 2026
c830dbf
feat(plugin): loadPlugin() now real across Swift / Kotlin / Dart / TS
sanchitmonga22 Apr 19, 2026
0535eb7
test(abi): 4 new unit tests for ra_registry_{load,unload,count} C ABI
sanchitmonga22 Apr 19, 2026
5df7d4e
docs(v2): migration reality check — 104-158 person-days, not a bridge…
sanchitmonga22 Apr 19, 2026
acd334e
refactor: rename sdk/runanywhere-* → sdk/legacy/*, frontends/* → sdk/*
sanchitmonga22 Apr 19, 2026
73d9431
ci: trigger rebuild after sdk/ rename
sanchitmonga22 Apr 19, 2026
ae16a13
fix(ci): update JNI bridge path in core/CMakeLists.txt to sdk/kotlin/
sanchitmonga22 Apr 19, 2026
e7ced33
feat(abi): LLM context injection + core-side dispatch layer
sanchitmonga22 Apr 20, 2026
e710720
feat(abi): ra_platform_adapter — struct-of-callbacks for iOS/Android …
sanchitmonga22 Apr 20, 2026
93d5ef5
feat(abi): ra_core_init + logger + validators — gap-list items 5, 6, 10
sanchitmonga22 Apr 20, 2026
4432020
feat(abi): ra_state_* — SDK state + auth lifecycle C ABI over AuthMan…
sanchitmonga22 Apr 20, 2026
aa21aa8
feat(swift): LLMSession — direct ra_llm_* binding + xcframework headers
sanchitmonga22 Apr 20, 2026
2633497
feat(abi+swift): STT/TTS/VAD/Embed/WW dispatch + matching Swift sessions
sanchitmonga22 Apr 20, 2026
a2dbe20
feat(swift): SDKState — init / env / auth / device registration wrappers
sanchitmonga22 Apr 20, 2026
46c3182
feat(swift): PlatformAdapter — bridge FileManager/Keychain/URLSession…
sanchitmonga22 Apr 20, 2026
c8ffe3b
test(swift): cover SDKState auth lifecycle + session error paths
sanchitmonga22 Apr 20, 2026
bccaf4e
feat(swift): ChatSession — message-history API over LLMSession
sanchitmonga22 Apr 20, 2026
55c6eab
fix(paths): sdk/runanywhere-* → sdk/legacy/* after directory rename +…
sanchitmonga22 Apr 20, 2026
b0ce18f
feat(swift): ToolCalling — ToolFormatter + ToolCallingAgent on top of…
sanchitmonga22 Apr 20, 2026
686c4d8
feat(swift): StructuredOutput — Decodable-typed JSON generation over …
sanchitmonga22 Apr 20, 2026
e42760d
feat(swift-demo): exercise full new public API surface
sanchitmonga22 Apr 20, 2026
fbb112c
feat(swift+kotlin): legacy-compat shims + Kotlin package rename
sanchitmonga22 Apr 20, 2026
afc34bb
feat(ts): LLM/STT/TTS/VAD/Embed sessions + Chat + ToolCalling + SDKSt…
sanchitmonga22 Apr 20, 2026
14b6549
feat(dart): LLM/STT/TTS/VAD/Embed sessions + SDKState + ChatSession +…
sanchitmonga22 Apr 20, 2026
a14cc89
feat(web): LLM/STT/TTS/VAD/Embed sessions + Chat + ToolCalling + SDKS…
sanchitmonga22 Apr 20, 2026
2207ed8
feat(abi): close every Phase A C ABI parity gap
sanchitmonga22 Apr 20, 2026
b65a480
refactor(abi): drop rac_compat — no legacy bridge needed post-cutover
sanchitmonga22 Apr 20, 2026
9959abc
feat(swift): VLM/Diffusion/RAG/LoRA/EventBus/Backends + canonical Run…
sanchitmonga22 Apr 20, 2026
10b9f68
feat(kotlin): VLM/Diffusion/RAG/LoRA/EventBus + canonical RunAnywhere…
sanchitmonga22 Apr 20, 2026
9a0fe89
feat(dart): canonical RunAnywhereSDK + VLM/Diffusion/RAG/LoRA/catalog
sanchitmonga22 Apr 20, 2026
25c6cfd
feat(ts+web): canonical RunAnywhere catalog + VLM/Diffusion/RAG/LoRA/…
sanchitmonga22 Apr 20, 2026
0f5cf20
feat(engines): onnx, whisperkit, metalrt, genie, diffusion-coreml stu…
sanchitmonga22 Apr 20, 2026
4e14a1d
feat(examples): repoint Android/Flutter/RN/Web to new SDK paths
sanchitmonga22 Apr 20, 2026
63b3701
feat(spm): cut over root Package.swift to sdk/swift (delete legacy ta…
sanchitmonga22 Apr 20, 2026
e712c4a
chore: delete sdk/legacy/ + scratch demo dirs (Phase E cutover)
sanchitmonga22 Apr 20, 2026
9b55b48
docs+ci: post-cutover state doc + CI workflow refresh
sanchitmonga22 Apr 20, 2026
39c18a0
chore: untrack thoughts/ (planning docs) — already in .gitignore
sanchitmonga22 Apr 20, 2026
6248ef9
feat(swift): Wave 0 — restore P0 legacy API shapes (iOS sample compiles)
sanchitmonga22 Apr 20, 2026
bf15e6b
feat(swift): Wave 1 — Platform services (AudioCapture, AudioPlayback,…
sanchitmonga22 Apr 20, 2026
e5093b9
feat(swift): Wave 2d — Apple Foundation Models bridge
sanchitmonga22 Apr 20, 2026
ea57669
feat(abi): Wave 3a — ra_auth.h C ABI over AuthManager
sanchitmonga22 Apr 20, 2026
45004af
feat(abi): Wave 3b — expand ra_telemetry.h with device reg + batch he…
sanchitmonga22 Apr 20, 2026
b8f3be5
feat(abi): Wave 3d — ra_model.h framework × category + format helpers
sanchitmonga22 Apr 20, 2026
9a3111e
docs(ci): Wave 9 — remove legacy workflows; update v2-migration; add …
sanchitmonga22 Apr 20, 2026
a6f4305
feat: Wave 2b — WhisperKit STT Swift ↔ C plugin bridge
sanchitmonga22 Apr 20, 2026
1a7a99f
feat: Wave 2c — CoreML Stable Diffusion Swift ↔ C plugin bridge + cat…
sanchitmonga22 Apr 20, 2026
62ce760
feat(abi): Wave 3c — download orchestrator retry + SHA-256 verify
sanchitmonga22 Apr 20, 2026
46885d7
feat(abi): Wave 3e — ra_rag.h chunker + in-memory vector store
sanchitmonga22 Apr 20, 2026
ecbd717
feat(server): Wave 4 — OpenAI-compatible HTTP server in solutions/ope…
sanchitmonga22 Apr 20, 2026
3528d7e
feat(engines): Wave 2a+2e — ONNX + MetalRT Swift/Kotlin callback bridges
sanchitmonga22 Apr 20, 2026
f52b4ac
feat(kotlin): Wave 5 — JNI extensions + Android platform services
sanchitmonga22 Apr 20, 2026
9ac4611
feat(web): Wave 8 — WASM build script + extended exports
sanchitmonga22 Apr 20, 2026
cafc539
feat(rn): Wave 6 — sdk/rn/ federated packages scaffold
sanchitmonga22 Apr 20, 2026
ad3f6bc
feat(flutter): Wave 7 — sdk/dart/packages/ federated scaffold
sanchitmonga22 Apr 20, 2026
27b0a18
docs: final Path-A restoration progress — all 18 waves complete
sanchitmonga22 Apr 20, 2026
b46790a
feat(swift): Phase B.1 — wire new C ABIs into Swift SDK; add HTTP/Dow…
sanchitmonga22 Apr 20, 2026
2690024
feat(sdks): Phase B.2/B.3/B.4/B.5 — Kotlin/Dart/TS/Web consume every …
sanchitmonga22 Apr 20, 2026
0d813b4
fix(server): Phase D.2 — parity pass 1 fixes (OpenAI server routes + …
sanchitmonga22 Apr 20, 2026
d638f70
fix(swift): Phase E.2 — sample-app compat overlay (parity pass 2 fixes)
sanchitmonga22 Apr 20, 2026
852d8c7
feat(swift): Phase F.1 partial — ~150 sample-app compat shims
sanchitmonga22 Apr 20, 2026
fda1bc0
feat(android+kotlin): Phase F.2 complete — examples/android assembles…
sanchitmonga22 Apr 20, 2026
8f5b6c3
feat(web): Phase F.5 partial — web SDK compat overlay reduces sample …
sanchitmonga22 Apr 20, 2026
a63285c
docs: Phase G — final parity-execution status report
sanchitmonga22 Apr 20, 2026
fb040c6
chore: Wave 0 — delete SampleAppCompat workarounds + remove Genie fro…
sanchitmonga22 Apr 20, 2026
1d4a387
feat(core): Wave 1 — C++ taxonomy documentation + whispercpp engine stub
sanchitmonga22 Apr 20, 2026
a1410bd
feat: C++ + Swift + iOS end-to-end — 99.8% sample error reduction
sanchitmonga22 Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .clangd
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# clangd config — used by IDEs until CMake produces compile_commands.json.
# After running `cmake --preset macos-debug`, clangd picks up the full flags
# from build/macos-debug/compile_commands.json.

CompileFlags:
Add:
- "-std=c++20"
- "-xc++"
- "-Wall"
- "-Wextra"
- "-Wpedantic"
- "-I${workspaceFolder}/core"
- "-I${workspaceFolder}/core/abi"
CompilationDatabase: build/macos-debug

Diagnostics:
UnusedIncludes: Strict
ClangTidy:
Add:
- modernize-*
- performance-*
- bugprone-*
- cppcoreguidelines-*
Remove:
- modernize-use-trailing-return-type
- modernize-avoid-c-arrays
- cppcoreguidelines-avoid-c-arrays
- cppcoreguidelines-pro-type-union-access
- cppcoreguidelines-pro-bounds-array-to-pointer-decay
- cppcoreguidelines-pro-bounds-pointer-arithmetic

Index:
Background: Build

InlayHints:
Enabled: Yes
ParameterNames: Yes
DeducedTypes: Yes

---
# C/ABI headers are plain C — exclude C++ flags.
If:
PathMatch: [ "core/abi/.*\\.h", "core/abi/.*\\.c" ]
CompileFlags:
Add:
- "-xc"
- "-std=c11"
Remove:
- "-std=c++20"
- "-xc++"
194 changes: 194 additions & 0 deletions .github/workflows/v2-core.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
name: v2 core

on:
pull_request:
paths:
- 'core/**'
- 'engines/**'
- 'solutions/**'
- 'frontends/**'
- 'idl/**'
- 'cmake/**'
- 'tools/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'vcpkg.json'
- '.github/workflows/v2-core.yml'
push:
branches: [main]
paths:
- 'core/**'
- 'engines/**'
- 'solutions/**'
- 'frontends/**'
- 'idl/**'
- 'cmake/**'
- 'tools/**'
- 'CMakeLists.txt'
- 'CMakePresets.json'
- 'vcpkg.json'
- '.github/workflows/v2-core.yml'
workflow_dispatch:
Comment thread
coderabbitai[bot] marked this conversation as resolved.

concurrency:
group: v2-core-${{ github.ref }}
cancel-in-progress: true

jobs:

# ---------------------------------------------------------------------------
# C++ core + engines + solutions — macOS Debug (ASan + UBSan).
# ---------------------------------------------------------------------------
cpp-macos:
runs-on: macos-14
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: |
brew install cmake ninja protobuf
- name: Configure (macOS Debug, sanitizers ON)
run: |
cmake --preset macos-debug -DRA_BUILD_ENGINES=ON -DRA_BUILD_SOLUTIONS=ON
- name: Build
run: cmake --build --preset macos-debug
- name: Test
run: ctest --preset macos-debug --output-on-failure

# ---------------------------------------------------------------------------
# C++ core + engines + solutions — Linux Debug (ASan + UBSan).
# ---------------------------------------------------------------------------
cpp-linux:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
cmake ninja-build g++ protobuf-compiler libprotobuf-dev libgtest-dev
- name: Configure (Linux Debug, sanitizers ON)
run: |
cmake --preset linux-debug -DRA_BUILD_ENGINES=ON -DRA_BUILD_SOLUTIONS=ON
- name: Build
run: cmake --build --preset linux-debug
- name: Test
run: ctest --preset linux-debug --output-on-failure

# ---------------------------------------------------------------------------
# Proto codegen — verify checked-in generated files are up-to-date.
# ---------------------------------------------------------------------------
proto-codegen-swift:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: macos-14
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install protoc + swift-protobuf
run: brew install protobuf swift-protobuf
- name: Regenerate Swift bindings
run: ./idl/codegen/generate_swift.sh
- name: Verify no drift (only when generated files are already committed)
run: |
# Phase 0 bootstrap: Generated/ only contains .gitkeep. After the
# first real landing of generated files (tracked under
# Generated/*.pb.swift), the drift check becomes strict.
TRACKED_PB=$(git ls-files 'frontends/swift/Sources/RunAnywhere/Generated/*.pb.swift')
if [[ -z "$TRACKED_PB" ]]; then
echo "No generated .pb.swift files tracked yet — drift check skipped until first codegen PR."
exit 0
fi
if [[ -n "$(git status --porcelain frontends/swift/Sources/RunAnywhere/Generated)" ]]; then
echo "Generated Swift files are stale. Run ./idl/codegen/generate_swift.sh and commit." >&2
git --no-pager diff frontends/swift/Sources/RunAnywhere/Generated >&2
exit 1
fi

# ---------------------------------------------------------------------------
# Swift frontend — SwiftPM build + test (macOS). Generated/ stays empty in
# this PR so SwiftPM falls back to adapter-only compilation.
# ---------------------------------------------------------------------------
swift-frontend:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: macos-14
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v2
with:
swift-version: '5.9'
- name: Build RunAnywhereV2 (SwiftPM)
working-directory: frontends/swift
run: swift build -v
- name: Run tests
working-directory: frontends/swift
run: swift test -v

# ---------------------------------------------------------------------------
# Kotlin frontend — Gradle build + unit tests.
# ---------------------------------------------------------------------------
kotlin-frontend:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment on lines +85 to +169
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Build frontends/kotlin
working-directory: frontends/kotlin
run: gradle --no-daemon build
- name: Test frontends/kotlin
working-directory: frontends/kotlin
run: gradle --no-daemon test

# ---------------------------------------------------------------------------
# Dart frontend — analyze + test.
# ---------------------------------------------------------------------------
dart-frontend:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment on lines +170 to +201
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
with:
sdk: stable
- name: Pub get
working-directory: frontends/dart
run: dart pub get
- name: Analyze
working-directory: frontends/dart
run: dart analyze
- name: Test
working-directory: frontends/dart
run: dart test

# ---------------------------------------------------------------------------
# TS / RN frontend — tsc + vitest.
# ---------------------------------------------------------------------------
ts-frontend:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Comment on lines +202 to +235
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install TS deps
working-directory: frontends/ts
run: npm install --no-save
- name: Typecheck TS
working-directory: frontends/ts
run: npm run typecheck
- name: Test TS
working-directory: frontends/ts
run: npm test
- name: Install Web deps
working-directory: frontends/web
run: npm install --no-save
- name: Typecheck Web
working-directory: frontends/web
run: npm run typecheck
- name: Test Web
working-directory: frontends/web
run: npm test

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ sdk/runanywhere-flutter/android/*.aar

# React Native - Pre-built xcframeworks (build artifacts)
sdk/runanywhere-react-native/packages/*/ios/xcframeworks/
tools/
sdk/runanywhere-react-native/packages/rag/ios/.testlocal


Expand All @@ -396,8 +395,8 @@ __pycache__/

# Node
node_modules/
/tools/
*.trace

# External starter-app clones for local reference (release.yml clones them fresh)
external_examples/
build/
126 changes: 126 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# RunAnywhere v2 — top-level CMake entry point.
#
# This file is the entry point for the v2 monorepo build. It does NOT replace
# the legacy `sdk/runanywhere-commons/CMakeLists.txt` during the migration — v1
# and v2 coexist until Phase 3 flips the default.
#
# Build the v2 core only:
# cmake --preset macos-debug
# cmake --build --preset macos-debug
#
# Build a specific frontend (e.g. Swift XCFramework):
# cmake --preset ios-release
# cmake --build --preset ios-release --target RunAnywhereCore
#
# See cmake/presets.json and docs/v2_build.md for the full matrix.

cmake_minimum_required(VERSION 3.22)

# Silence CMP0077 — option() honors normal vars. Required for vcpkg overlay.
if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()

project(RunAnywhereV2
VERSION 2.0.0
DESCRIPTION "RunAnywhere v2 — C++20 core + codegen'd frontends for on-device AI"
LANGUAGES C CXX
)

# Enable Objective-C++ only on Apple platforms where we need CoreML/AVFoundation bridges.
if(APPLE)
enable_language(OBJCXX)
endif()

# ---------------------------------------------------------------------------
# Global C++ settings
# ---------------------------------------------------------------------------
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Default to Release if the user did not specify a build type.
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()

# ---------------------------------------------------------------------------
# Options
# ---------------------------------------------------------------------------
option(RA_BUILD_TESTS "Build unit tests" ON)
option(RA_BUILD_TOOLS "Build tools/benchmark and pipeline-validator" ON)
option(RA_BUILD_FRONTENDS "Build frontends/*" OFF)
option(RA_BUILD_ENGINES "Build engines/*" ON)
option(RA_BUILD_SOLUTIONS "Build solutions/*" ON)
option(RA_ENABLE_SANITIZERS "Enable ASan/UBSan (Debug only)" ON)
option(RA_ENABLE_TSAN "Enable TSan (separate from ASan/UBSan)" OFF)
option(RA_ENABLE_LTO "Enable Link-Time Optimization on Release" OFF)

# Plugin discovery mode — mutually exclusive with the legacy commons tree.
option(RA_USE_LEGACY_COMMONS "Fall back to sdk/runanywhere-commons for engines" OFF)

# ---------------------------------------------------------------------------
# Platform detection + compiler flags
# ---------------------------------------------------------------------------
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/platform.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/sanitizers.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/plugins.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/protobuf.cmake)

# ---------------------------------------------------------------------------
# Subprojects
# ---------------------------------------------------------------------------
add_subdirectory(core)

if(RA_BUILD_ENGINES)
add_subdirectory(engines/llamacpp)
add_subdirectory(engines/sherpa)
add_subdirectory(engines/wakeword)
endif()

if(RA_BUILD_SOLUTIONS)
add_subdirectory(solutions/voice-agent)
add_subdirectory(solutions/rag)
endif()

if(RA_BUILD_FRONTENDS)
# Each frontend opts in via its own CMakeLists.txt — Swift uses XCFramework
# packaging; Kotlin uses Gradle (not CMake); Dart/TS use npm/pub.
if(RA_PLATFORM STREQUAL "IOS" OR RA_PLATFORM STREQUAL "MACOS")
add_subdirectory(frontends/swift)
endif()
if(RA_PLATFORM STREQUAL "WASM")
add_subdirectory(frontends/web/wasm)
endif()
endif()

if(RA_BUILD_TOOLS)
add_subdirectory(tools/benchmark)
add_subdirectory(tools/pipeline-validator)
endif()

if(RA_BUILD_TESTS AND NOT RA_PLATFORM STREQUAL "IOS" AND NOT RA_PLATFORM STREQUAL "WASM")
enable_testing()
add_subdirectory(core/tests)
endif()

# ---------------------------------------------------------------------------
# Summary
# ---------------------------------------------------------------------------
message(STATUS "")
message(STATUS "========================================================")
message(STATUS " RunAnywhere v2 build configuration")
message(STATUS "========================================================")
message(STATUS " Platform : ${RA_PLATFORM}")
message(STATUS " CXX : ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS " Build type : ${CMAKE_BUILD_TYPE}")
message(STATUS " Sanitizers : ASan=${RA_ENABLE_SANITIZERS} TSan=${RA_ENABLE_TSAN}")
message(STATUS " Plugin mode : ${RA_PLUGIN_MODE} (iOS=static, others=dlopen)")
message(STATUS " Build engines : ${RA_BUILD_ENGINES}")
message(STATUS " Build solutions : ${RA_BUILD_SOLUTIONS}")
message(STATUS " Build frontends : ${RA_BUILD_FRONTENDS}")
message(STATUS " Build tests : ${RA_BUILD_TESTS}")
message(STATUS " Build tools : ${RA_BUILD_TOOLS}")
message(STATUS "========================================================")
message(STATUS "")
Loading
Loading