Tools

Kotlin multiplatform libraries that work anywhere.

Dependency injection, serialization, reactive state, immutable data, date/time, and caching — the building blocks behind Kraft and Funktor.

Kontainer

Lightweight dependency injection

A DI container built around per-request scoping. Define a blueprint, create container instances with fresh dynamic services per unit of work. Constructor injection, validated dependency graphs, three lifecycles (Singleton, Dynamic, Prototype), lazy injection, and full introspection.

Per-request container instances Validated at startup Lazy & list injection Module system

Slumber

Kotlin-first serialization

Serialization that understands nullable types, default values, and sealed classes without annotation clutter. Codec-based architecture with pluggable modules for datetime, polymorphism, and custom types. Designed to serialize to and from maps/lists rather than a specific wire format.

Nullable-aware Polymorphic sealed classes Codec modules Map-based, format-agnostic

Mutator

Modify immutable data structures

KSP-generated code that lets you modify deeply nested immutable data structures with simple property assignments. Mark your data classes with @Mutable and get type-safe mutator functions that compose across nesting levels — including lists, sets, and maps.

KSP code generation Deep nesting support Collection mutators No runtime reflection

Streams

Reactive values

A lightweight reactive streams library where every stream always has a current value. Lazy subscription chains, composable operators (map, filter, combine, debounce, fold, history), error-resilient subscribers, and Flow interop. Built for UI state in Kraft.

Always-has-a-value Lazy subscriptions JS: localStorage, animTicker Flow bridge

Datetime

Multiplatform date and time

Date, time, timezone, and range types for Kotlin Multiplatform. Built on kotlinx-datetime with a type system designed to prevent common mistakes: MpLocalDateTime has no arithmetic (DST-ambiguous), MpInstant requires a timezone for calendar ops. Rich anchoring, formatting, and a testable Kronos clock.

Guard-rail type system 600+ IANA timezones Kronos testable clock Ranges & time slots

Cache

In-memory caching

A coroutine-based in-memory cache with pluggable eviction: TTL after last access, max entries (LRU), or max memory with recursive object size estimation. Thread-safe, multiplatform, and designed for hot paths like serialization caches.

TTL / LRU / memory-aware Pluggable behaviors Coroutine background loop Object size estimation

Maths

Easing functions and distributions

28 easing functions organized into In, Out, and InOut categories, with range binding and time-based animation via Kronos. Four bucketed probability distributions (uniform, normal, exponential, triangular) with inverse-CDF sampling and combinators for blending, inverting, and reversing.

28 easing functions 4 distribution types Time-based animation Distribution combinators