Dari

Module Structure

Dari's three-module architecture for zero production overhead

Dari is split into three modules to keep release builds free of debug code.

dari-core

Kotlin Multiplatform contracts module for Android, JVM, and iOS. It has no UI, Room database, or notifications and can be added to commonMain:

commonMain.dependencies {
  implementation("io.github.easyhooon:dari-core:<version>")
}

Contains:

  • DariConfig: configuration data class
  • DariInterceptor: interface for capturing bridge messages
  • MessageEntry: data model for a bridge call lifecycle
  • MessageStatus: enum: IN_PROGRESS, SUCCESS, ERROR
  • MessageDirection: enum: WEB_TO_APP, APP_TO_WEB

KMP support currently covers these shared models and interception contracts. The inspector runtime, WebView integration, persistence, and UI remain Android-only in dari.

dari

Full debug implementation. Depends on dari-core.

Contains:

  • DefaultDariInterceptor: stores messages in Room, posts notifications
  • Dari: singleton entry point (init, createInterceptor, clear)
  • Inspector UI (Jetpack Compose)
  • Room database + DAO
  • Shake-to-open sensor

Add to debugImplementation only.

dari-noop

No-op stub that depends on dari-core. Dari.init() and other runtime APIs do nothing, while Dari.createInterceptor() returns null.

Add to releaseImplementation to ensure zero runtime overhead in production builds.

On this page