Skip to content
This repository was archived by the owner on Jan 17, 2026. It is now read-only.

RunanywhereAI/runanywhere-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

108 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

RunAnywhere Core

Private C++ core library providing unified ML inference across ONNX Runtime, LlamaCPP, and CoreML backends with multi-modality support.

Platform License Build

🎯 Overview

RunAnywhere Core is the foundational C/C++ library that powers the RunAnywhere SDK family. It provides a unified, cross-platform API for running machine learning models on-device across multiple inference backends.

Key Features

  • πŸ”„ Multi-Backend Support: ONNX Runtime, LlamaCPP, CoreML, TensorFlow Lite, ExecuTorch
  • 🎀 Multi-Modality: Speech-to-Text (ASR), Text-to-Speech (TTS), Text Generation (LLM)
  • πŸ“± Cross-Platform: iOS, Android, macOS, Linux with consistent C API
  • ⚑ High Performance: Native C++ implementation with platform-specific optimizations
  • πŸ”Œ Clean Integration: Simple C API for easy binding to Swift, Kotlin, and other languages
  • πŸ“Š Built-in Telemetry: Performance monitoring and device capability detection

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Platform SDKs (Swift, Kotlin)             β”‚
β”‚  (runanywhere-swift, runanywhere-kotlin, ...)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚ C API
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              RunAnywhere Core (C++)                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚        Common Infrastructure                 β”‚   β”‚
β”‚  β”‚  β€’ Telemetry  β€’ Device Info  β€’ Utilities    β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚  β”‚  ONNX    β”‚ LlamaCPP β”‚  CoreML  β”‚ TFLite   β”‚      β”‚
β”‚  β”‚ Runtime  β”‚          β”‚          β”‚          β”‚      β”‚
β”‚  β”‚ Backend  β”‚ Backend  β”‚ Backend  β”‚ Backend  β”‚      β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚          β”‚          β”‚          β”‚
   β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β” β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”΄β”€β”€β”€β”€β” β”Œβ”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
   β”‚ ONNX   β”‚ β”‚ llama  β”‚ β”‚ Core   β”‚ β”‚ TFLite  β”‚
   β”‚Runtime β”‚ β”‚  .cpp  β”‚ β”‚   ML   β”‚ β”‚         β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Prerequisites

  • CMake 3.22 or later
  • C++17 compatible compiler
  • Platform-specific tools:
    • iOS/macOS: Xcode 14+
    • Android: Android NDK r25+
    • Linux: GCC 9+ or Clang 10+

Building

# Download ONNX Runtime dependency (iOS only, first time)
cd /path/to/runanywhere-core
./scripts/download-onnx-ios.sh

# Build for iOS (creates XCFramework)
./scripts/build-ios-onnx.sh

# The built XCFramework will be in dist/RunAnywhereONNX.xcframework

Integration

Copy the built XCFramework to your Swift/Kotlin SDK:

# For Swift SDK
cp -r dist/RunAnywhereONNX.xcframework \
  /path/to/runanywhere-swift/XCFrameworks/

See BUILD.md for detailed build instructions.

πŸ“š Documentation

πŸ”§ Build Scripts

Script Purpose
scripts/download-onnx-ios.sh Download ONNX Runtime iOS dependency
scripts/build-ios-onnx.sh Build ONNX Runtime XCFramework for iOS

See scripts/README.md for detailed documentation.

πŸ“ Repository Structure

runanywhere-core/
β”œβ”€β”€ cmake/                 # CMake modules for dependency management
β”œβ”€β”€ docs/                  # Documentation
β”œβ”€β”€ include/               # Public C API headers
β”œβ”€β”€ plans/                 # Architecture and planning docs
β”œβ”€β”€ scripts/               # Build automation scripts
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ backends/         # Backend implementations
β”‚   β”‚   └── onnx/        # ONNX Runtime backend
β”‚   β”‚       β”œβ”€β”€ backend/ # Core C++ implementation
β”‚   β”‚       └── bridge/  # Platform bridges (iOS/Android)
β”‚   └── common/          # Shared utilities
β”œβ”€β”€ third_party/          # External dependencies (downloaded)
β”‚   β”œβ”€β”€ json/            # nlohmann/json (submodule)
β”‚   └── onnxruntime-ios/ # ONNX Runtime (downloaded via script)
β”œβ”€β”€ BUILD.md             # Build instructions
└── README.md            # This file

🎯 Supported Backends

Backend Status Platforms Modalities
ONNX Runtime βœ… Implemented iOS, Android, macOS, Linux ASR, TTS, LLM
LlamaCPP 🚧 Planned iOS, Android, macOS, Linux LLM
CoreML 🚧 Planned iOS, macOS ASR, TTS, LLM
TensorFlow Lite 🚧 Planned iOS, Android, Linux ASR, Vision
ExecuTorch 🚧 Planned iOS, Android LLM

🎀 Supported Modalities

  • Speech-to-Text (ASR): Convert spoken audio to text
  • Text-to-Speech (TTS): Generate natural speech from text
  • Text Generation (LLM): Large language model inference

πŸ› οΈ Development

Prerequisites for Development

# macOS/iOS development
brew install cmake ninja

# Install Xcode Command Line Tools
xcode-select --install

Building for Different Platforms

iOS

./scripts/download-onnx-ios.sh  # First time only
./scripts/build-ios-onnx.sh

Android

# Coming soon

macOS

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(sysctl -n hw.ncpu)

Linux

mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

πŸ§ͺ Testing

# Build with tests enabled
cmake .. -DBUILD_TESTS=ON
make
ctest --output-on-failure

πŸ“ License

This is private, proprietary software. All rights reserved.

See LICENSE for details.

🀝 Contributing

This is a private repository. For RunAnywhere team members:

  1. Create a feature branch from develop
  2. Follow the code style (C++17, Google C++ Style Guide)
  3. Write tests for new functionality
  4. Submit a Pull Request

See CONTRIBUTING.md for detailed guidelines.

πŸ“ž Support

For issues and questions:

  • Internal Team: Slack #runanywhere-core channel
  • Bug Reports: GitHub Issues (private repo)
  • Documentation: See docs/ directory

πŸ”— Related Projects

πŸ“Š Project Status

Current implementation status:

  • βœ… ONNX Runtime backend (iOS)
  • βœ… Multi-modality support (ASR, TTS, LLM)
  • βœ… iOS XCFramework build pipeline
  • βœ… Swift SDK integration
  • 🚧 Android support
  • 🚧 Additional backends

See IMPLEMENTATION_STATUS.md for detailed progress.


Made with ❀️ by the RunAnywhere Team

About

Runanywhere core - routing + policies + multi backend spport.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors