KiteCore

Runtime utilities for Kotlin Multiplatform, for the pieces that commonMain does not have.

KiteCore has four platform primitives (ioDispatcher, asyncWithProgress, WeakRef and Platform), a portable String.format, and a short list of coroutine and Flow helpers. Its only dependency is kotlinx-coroutines-core. It runs on Android, the JVM, iOS, macOS, JS and Wasm.

You want toUse
Run blocking calls in common codeioDispatcher
Show the progress of a long operationasyncWithProgress
Point to an object without keeping it aliveWeakRef
Know the OS and devicePlatform.current
Format text with Java's syntaxString.format
Retry, run in parallel, share workthe coroutines package
Throttle a flow, derive a StateFlowthe flow package

Packages

Link copied to clipboard

The platform primitives: each one gives common code something that only some targets have.

Link copied to clipboard

Suspend helpers that handle cancellation correctly.

Link copied to clipboard

Flow operators and StateFlow helpers.

Link copied to clipboard

A String.format for common code, with the syntax and output of java.util.Formatter.