Skip to content
sonmbol edited this page Jul 28, 2026 · 2 revisions

KMPObservableBridge Wiki

KMPObservableBridge connects Kotlin Multiplatform ViewModels to SwiftUI while Kotlin remains the authoritative state store. It provides SwiftUI-style ownership, compiler-checked observation configuration, deterministic cancellation, and isolated SKIE and KMP-NativeCoroutines integrations.

KMPObservableBridge architecture

Start here

Design principles

  • Kotlin owns business state; the bridge stores observation metadata only.
  • SwiftUI owns view identity and wrapper lifetime.
  • Explicit key paths provide compile-time validation without runtime reflection.
  • Macro-configured wrappers share collectors for the same model identity.
  • SKIE’s hot path remains on MainActor.
  • Foreign callbacks cross to MainActor once.
  • Owners dispose models; observers never do.

Help shape the API

Two open design problems need community input:

The alternatives already explored, their constraints, and the current design are documented in the architecture discussion. If you have a different approach, share a concrete expansion model, ownership contract, and expected rendering cost there.

Support

Use GitHub Discussions for architecture and integration questions. File a GitHub issue for a reproducible defect.

Clone this wiki locally