Expand description
VelesDB Mobile - Native bindings for iOS and Android
This crate provides UniFFI bindings for VelesDB, enabling native integration with Swift (iOS) and Kotlin (Android) applications.
§Architecture
- iOS: Generates Swift bindings + XCFramework (arm64 device, arm64/x86_64 simulator)
- Android: Generates Kotlin bindings + AAR (arm64-v8a, armeabi-v7a, x86_64)
§Build Commands
# iOS - build for device and simulator
cargo build --release --target aarch64-apple-ios
cargo build --release --target aarch64-apple-ios-sim
cargo build --release --target x86_64-apple-ios # Intel simulator
# iOS - create universal binary + XCFramework
lipo -create \
target/aarch64-apple-ios-sim/release/libvelesdb_mobile.a \
target/x86_64-apple-ios/release/libvelesdb_mobile.a \
-output target/universal-sim/libvelesdb_mobile.a
xcodebuild -create-xcframework \
-library target/aarch64-apple-ios/release/libvelesdb_mobile.a \
-library target/universal-sim/libvelesdb_mobile.a \
-output VelesDB.xcframework
# Android (requires cargo-ndk: cargo install cargo-ndk)
cargo ndk -t arm64-v8a -t armeabi-v7a -t x86_64 build --releaseStructs§
- Individual
Search Request - Individual search request within a batch.
- Mobile
Advanced Config - Post-creation overrides for advanced collection configuration.
- Mobile
Async Index Builder Config - Async index builder configuration (parallel segment construction for deferred bulk loads).
- Mobile
Collection Diagnostics - Diagnostic snapshot of a collection’s health and search readiness.
- Mobile
Collection Stats - Public statistics snapshot for a collection.
- Mobile
Deferred Indexer Config - Deferred indexing configuration (buffers bulk inserts before merging into the HNSW index).
- Mobile
Graph Edge - A graph edge representing a relationship.
- Mobile
Graph Node - A graph node for knowledge graph construction.
- Mobile
Graph Store - In-memory graph store for mobile knowledge graphs.
- Mobile
Index Info - Metadata and graph index details.
- Mobile
Query Context - Read-time context handed to a foreign
MobileObserver. - Mobile
Query Limits - Runtime query guardrail limits for a collection.
- Mobile
Streaming Config - Configuration for streaming ingestion on a collection.
- PqTrain
Config - Configuration for Product Quantization training.
- Query
Result - Result of executing a VelesQL query via
crate::VelesDatabase::execute_query. - Query
Result Row - A single row in a query result, serialized as JSON for FFI safety.
- Search
Result - A search result containing an ID and similarity score.
- Semantic
Result - Result from semantic memory query.
- Traversal
Result - Traversal result from BFS/DFS.
- Veles
Collection - A collection of vectors with associated metadata.
- Veles
Database - VelesDB database instance.
- Veles
Point - A point to insert into the database.
- Veles
Semantic Memory - Semantic Memory for AI agents on mobile.
- Veles
Sparse Vector - A sparse vector represented as parallel arrays of indices and values.
Enums§
- Distance
Metric - Distance metric for vector similarity.
- Fusion
Strategy - Fusion strategy for combining results from multiple vector searches.
- Mobile
Access Decision - The control-plane decision returned by a foreign
MobileObserver. - Mobile
Query Operation Kind - The read operation being gated (UniFFI mirror of core’s
QueryOperationKind). - Query
Result Kind - Classifies the kind of VelesQL statement that was executed.
- Search
Quality - Search quality profile controlling the recall/latency tradeoff.
- Storage
Mode - Storage mode for vector quantization (IoT/Edge optimization).
- Veles
Error - Errors that can occur when using VelesDB on mobile.
Traits§
- Mobile
Observer - Foreign-implementable read-path observer (UniFFI callback interface).