Skip to content

Commit 8795d22

Browse files
committed
chore: update AGENTS.md with Linux backend build and voice assistant instructions
1 parent e626d3a commit 8795d22

1 file changed

Lines changed: 26 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ This is a cross-platform SDK monorepo. On a Linux cloud VM, the buildable servic
1111
| Kotlin SDK (Android target) | `./gradlew :runanywhere-kotlin:compileDebugKotlinAndroid -Prunanywhere.testLocal=false` | Android unit tests require device/emulator | `./gradlew :runanywhere-kotlin:runKtlintCheckOverCommonMainSourceSet` | JVM target has a known issue: `RAGBridge.kt` in `jvmAndroidMain` imports `@Keep` from `androidx.annotation` which is unavailable for JVM compilation |
1212
| Web SDK (TypeScript) | `npm run build -w packages/core` (from `sdk/runanywhere-web/`) | N/A | `npm run typecheck -w packages/core` | `llamacpp` package has a pre-existing duplicate index signature TS error |
1313
| Web Example App | `npm run dev` (from `examples/web/RunAnywhereAI/`) | Manual browser testing at `localhost:5173` | N/A | Full Vite app, works in demo mode without WASM |
14-
| C++ Commons | `cmake -B build ... && cmake --build build` (from `sdk/runanywhere-commons/`) | Tests require model files | N/A | Must use `gcc`/`g++` on this VM (clang lacks C++ stdlib headers). Pass `-DRAC_BUILD_PLATFORM=OFF` on Linux |
14+
| C++ Commons (core) | `cmake -B build ... && cmake --build build` (from `sdk/runanywhere-commons/`) | `./build/tests/test_core --run-all` (13 tests, no models needed) | N/A | Must use `gcc`/`g++` via `CC=gcc CXX=g++` (clang lacks C++ stdlib headers). Pass `-DRAC_BUILD_PLATFORM=OFF` on Linux |
15+
| C++ Commons (full backends) | `CC=gcc CXX=g++ bash scripts/build-linux.sh --shared` | Backend tests need downloaded models | N/A | Builds onnx+llamacpp. RAG backend has pre-existing zero-size array bug; use `-DRAC_BACKEND_RAG=OFF`. Sherpa-ONNX v1.12.23 URL changed: use `sherpa-onnx-v{VER}-linux-x64-shared.tar.bz2` (no `-cpu` suffix) |
16+
| Linux Voice Assistant | `cmake -B build && cmake --build build` (from `Playground/linux-voice-assistant/`) | `./build/test-pipeline <audio.wav>` runs full VAD→STT→LLM→TTS pipeline | N/A | Requires: ALSA headers (`libasound2-dev`), built commons with backends, downloaded models (`./scripts/download-models.sh`). Audio capture needs real hardware; `test-pipeline` works headless |
1517
| iOS/Swift SDK | Not buildable | Not buildable | Not available | Requires macOS + Xcode |
18+
| Android emulator | Not runnable | Not runnable | N/A | No KVM support in cloud VM |
1619

1720
### Key Gotchas
1821

@@ -23,6 +26,28 @@ This is a cross-platform SDK monorepo. On a Linux cloud VM, the buildable servic
2326
- **`local.properties`**: Auto-created at root, `sdk/runanywhere-kotlin/`, and `examples/android/RunAnywhereAI/` with `sdk.dir=/opt/android-sdk`.
2427
- **pre-commit hooks**: Installed via `pre-commit install`. Requires `git config --unset-all core.hooksPath` first if `core.hooksPath` is set.
2528

29+
### Linux Voice Assistant Quick Start
30+
31+
```bash
32+
# 1. Build commons with backends
33+
cd sdk/runanywhere-commons
34+
CC=gcc CXX=g++ cmake -B build-linux-x86_64 -DCMAKE_BUILD_TYPE=Release \
35+
-DRAC_BUILD_BACKENDS=ON -DRAC_BACKEND_ONNX=ON -DRAC_BACKEND_LLAMACPP=ON \
36+
-DRAC_BACKEND_RAG=OFF -DRAC_BUILD_SHARED=ON -DRAC_BUILD_PLATFORM=OFF
37+
cmake --build build-linux-x86_64 -j$(nproc)
38+
39+
# 2. Copy libs to dist
40+
# (see build-linux.sh for full dist copy steps)
41+
42+
# 3. Build voice assistant
43+
cd Playground/linux-voice-assistant
44+
CC=gcc CXX=g++ cmake -B build && cmake --build build
45+
46+
# 4. Run test pipeline (headless, no mic needed)
47+
export LD_LIBRARY_PATH="../../sdk/runanywhere-commons/dist/linux/x86_64:../../sdk/runanywhere-commons/third_party/sherpa-onnx-linux/lib"
48+
./build/test-pipeline /path/to/audio.wav
49+
```
50+
2651
### Standard commands
2752

2853
See `CLAUDE.md` for comprehensive build/test/lint commands for all SDK platforms. See `CONTRIBUTING.md` for contributor setup flow.

0 commit comments

Comments
 (0)