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

The Kotlin Standard Library

This module creates the standard library for Kotlin.

Notes for contributors

We use code generation to generate utility extension functions for some collection-like types like arrays, strings, Collection<T>, Sequence<T>, Map<K, V> etc.

These 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 command in the root directory of the project:

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

Note: on Windows type gradlew without the leading ./

This then runs the script which generates a significant part of stdlib sources from the templates written in a special Kotlin-based DSL.

Usage samples

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