# Kotlin/kotlinx.collections.immutable

Immutable persistent collections for Kotlin

Repository: https://github.com/Kotlin/kotlinx.collections.immutable
Canonical: https://ross.abutalabs.com/products/kotlinxcollectionsimmutable
Homepage: https://kotlinlang.org/api/kotlinx.collections.immutable/
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: kotlin, collections, immutable-collections, immutable
Last push: 2026-08-26T18:34:42+00:00

## Health v2 (maintenance only)
Score: 85/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 59, longevity 100
- inputs: {"age_days": 3751, "days_push": 7, "days_rel": 62, "gap_med": 206.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1417, forks 72 (observed 2026-08-28T04:04:40.050956+00:00)

## What it is
A Kotlin Multiplatform library providing immutable and persistent collection interfaces and efficient implementations (lists, sets, maps) with structural sharing. It is an official JetBrains kotlinx library supporting JVM, JS, WASM, and Kotlin/Native targets.

## Use cases
- use immutable lists and maps in Kotlin
- persistent data structures with structural sharing
- share collections safely across threads without locking
- efficient copy-on-write collections for Compose state
- multiplatform collections for Kotlin/Native and JS
- build collections efficiently with persistent builders

## When to choose
- you need guaranteed immutability for thread safety or functional-style code
- you use Jetpack Compose or Compose Multiplatform where stable immutable collections improve performance
- you want efficient non-destructive updates via persistent data structures
- you need the same collection semantics across all Kotlin Multiplatform targets

## When to avoid
- you only need simple read-only views and standard Kotlin List/Set/Map suffice
- you need mutable, high-throughput collection mutation where persistent overhead matters
- you are not working in Kotlin or on the JVM/JS/Native targets

## Facets
- artifact type: library
- maturity: active
- function: serialization, developer-tools
- domain: programming-languages, developer-tools, cross-platform
- platform: jvm, wasm
- tags: kotlin-multiplatform, persistent-data-structures, immutable-collections, jetbrains, android, ios

## Member repositories
- Kotlin/kotlinx.collections.immutable (main) score 85

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:40.050956+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:37:59.462373+00:00, confidence not recorded.
  - readme: https://github.com/Kotlin/kotlinx.collections.immutable (fetched 2026-08-28T04:04:40.050956+00:00, sha 328016631080)
  - homepage: https://kotlinlang.org/api/kotlinx.collections.immutable/ (fetched 2026-08-29T11:50:36.593352+00:00, sha 5f2df1d22627)
  - site_page: https://kotlinlang.org/docs/android-overview.html (fetched 2026-08-29T11:50:36.596987+00:00, sha eee2641adc4c)
  - site_page: https://kotlinlang.org/docs/home.html (fetched 2026-08-29T11:50:36.598738+00:00, sha 79765d7a6b62)
  - site_page: https://kotlinlang.org/docs/multiplatform/get-started.html (fetched 2026-08-29T11:50:36.600405+00:00, sha e48dd2fd41c8)
  - site_page: https://kotlinlang.org/docs/api-references.html (fetched 2026-08-29T11:50:36.602031+00:00, sha 6ee90bcab394)
  - site_page: https://kotlinlang.org/docs/getting-started.html (fetched 2026-08-29T11:50:36.603557+00:00, sha b98a86bae0bd)
  - site_page: https://kotlinlang.org/docs/contribute.html (fetched 2026-08-29T11:50:36.605119+00:00, sha 3b3064342ea5)
  - site_page: https://kotlinlang.org/docs/releases.html (fetched 2026-08-29T11:50:36.606664+00:00, sha 3aaf77e63243)
  - site_page: https://kotlinlang.org/docs/security.html (fetched 2026-08-29T11:50:36.608589+00:00, sha 282d77b6fd03)
- Data as of 2026-08-30T08:39:29.467469+00:00.
