SwiftPM, on-device semantic search, shared Rust core

On-device semantic search for Swift apps

RetrievalKit gives Swift apps native async APIs for on-device semantic, keyword, and graph search over the shared Rust core. One package exposes selectable retrieval, graph, embedding, and pipeline products while keeping ranking, persistence, filtering, and generation safety in Rust.

DistributionSwiftPM 0.1.0 signed preview
Qualified macOSmacOS 14+ arm64
Qualified iOSiOS 15+ arm64 device or simulator

Responsibilities

What RetrievalKit handles—and what your app supplies.

Select the product boundary your target needs

Choose RetrievalKit for flat local retrieval or RetrievalKitGraph when the same application also needs graph-only or graph-scoped queries. EmbeddingKit remains independently selectable, and RetrievalKitPipeline composes the local pieces for supported Apple workflows.

The graph product already includes base retrieval. Selecting both retrieval aggregates in one process is unnecessary and can create ambiguous ownership; add the package once and choose the appropriate product for each target.

Semantic and hybrid search keep native Swift semantics

Swift builders, value types, async calls, errors, and lifecycle conventions follow Apple-platform expectations. The wrapper does not reimplement semantic vector scoring, BM25, hybrid ranking, graph traversal, filtering, or persistence in Swift.

Queries can supply text, a caller-produced embedding, or both. Query-time alpha controls semantic-only, BM25-only, or hybrid ranking under the same semantics used by the Python, TypeScript, Kotlin, and browser bindings.

The release claim names exact Apple targets

The signed v0.1.0 tag and versioned XCFramework are public through SwiftPM. The qualified package targets are macOS 14+ arm64 and iOS 15+ arm64 devices and Apple-silicon simulators.

A physical iPhone 17 Pro Max workload has separate frozen qualification evidence, but that result is not generalized to every iPhone or Apple processor. Package availability and device performance remain different claims.

Start from the signed source and runnable quickstart

The repository includes the Swift guide, XCFramework build script, and base-retrieval quickstart. Those examples exercise the same public package boundary rather than a separate documentation-only implementation.

  • Add the signed 0.1.0 package through SwiftPM.
  • Build the macOS XCFramework when running the source quickstart.
  • Use the async builder and close resources according to the Swift guide.