Installation
Add Sinua to a web, iOS, Android or React Native project.
Beta
Sinua is in public beta: every package is published as 0.1.0-beta.N, and the API can still change between betas (the changelog says what did). On npm, install with @beta as below; the untagged name still resolves to the first beta.
Every platform ships the same engine: a compiled Rust core (WebAssembly on the web, a native library on iOS and Android) plus a view layer for that platform.
# The Web view (React component, mount(), <sinua-view>) and the engine.
# @beta: the untagged name still resolves to the first beta.
npm i @sinua/web@beta @sinua/core@beta
# Voice-reactive? Add the sources. livekit-client only if you use LiveKit.
npm i @sinua/voice@beta
npm i livekit-client
| Platform | Package | What you get |
|---|---|---|
| Web | @sinua/web (+ @sinua/core) | the view for React, Web Components (Vue, Svelte, Angular, Solid, plain HTML) and a vanilla mount() |
| iOS | Swift package sinua-swift, products Sinua (+ SinuaVoice) | SwiftUI and UIKit views; iOS 15+ |
| Android | dev.sinua:sinua-view (+ dev.sinua:sinua-core) on Maven Central | Jetpack Compose and Android View; API 24+ |
| React Native | @sinua/react-native, from source for now | a native view over the iOS and Android views |
Voice sources for LiveKit, OpenAI Realtime, Gemini Live and ElevenLabs are separate: @sinua/voice on the web (one entry point per vendor) and one package per vendor on iOS and Android, so an app that doesn't use one never downloads its SDK. See Voice.
No bundler configuration on the web: the engine's WebAssembly is inlined into @sinua/core, so it works in Vite, webpack, Angular CLI (with Zone.js or zoneless), a plain <script type="module"> and Node. Pages with a Content Security Policy need 'wasm-unsafe-eval' in script-src.
From source
To build the packages yourself (or React Native, which isn't on npm yet), clone the repository and build them for your platform. Each package's build script regenerates the bindings from the engine.
# To build the packages yourself instead of installing the published ones.
git clone https://github.com/sinua-dev/sinua.git sinua && cd sinua
# Web: build the engine (Rust + wasm-pack) and the packages, then depend on them by path.
(cd packages/core && npm install && npm run build)
(cd packages/web && npm install && npm run build)
(cd packages/voice && npm install && npm run build)
# in your app: npm i ../sinua/packages/core ../sinua/packages/web ../sinua/packages/voice
# iOS: build the engine's xcframework, then add packages/ios as a local Swift package
# (Xcode: File > Add Package Dependencies... > Add Local...). Products: SinuaView, SinuaVoice.
packages/ios/build.sh
# Android: build the engine's .so files, then include the Gradle build from your settings.gradle.kts:
# includeBuild("../sinua/packages/android")
packages/android/build.sh