tree: 5eae3c7ec33401ac103ba2f462931d0d2c78060e [path history] [tgz]
  1. common/
  2. common-js-wasmjs/
  3. common-non-jvm/
  4. jdk7/
  5. jdk8/
  6. js/
  7. js-ir-minimal-for-test/
  8. jvm/
  9. jvm-minimal-for-test/
  10. native-wasm/
  11. samples/
  12. src/
  13. test/
  14. unsigned/
  15. wasm/
  16. build.gradle.kts
  17. gradle.properties
  18. kotlin-project-structure-metadata.beforePatch.json
  19. kotlin-project-structure-metadata.json
  20. ReadMe.md
libraries/stdlib/ReadMe.md

The Kotlin Standard Library

This module creates the standard library for Kotlin.

Code generation

We use code generation to generate some repetitive utility extension functions, e.g. for collection-like types: arrays, strings, Collection<T>, Sequence<T>, Map<K, V> etc. Those are defined in templates written in a special Kotlin-based DSL.

Generated sources are placed into the generated folder and their names are prefixed with an underscore, for example, generated/_Collections.kt

To run the code generator, use the following task:

./gradlew :tools:kotlin-stdlib-gen:run

Usage samples

If you want to author samples for the standard library, please head to the samples readme.