Files
kotlin-fork/js
Alexander Udalov 1d71c19b42 Serialize .kotlin_metadata binary files per source file
Do not serialize everything in the same package to the same file (as is done
for built-ins) because this approach is unfriendly to incremental compilation,
which is going to be supported in the future. Instead, similarly to JVM
serialize each class to its own file, and each source file with top-level
callables/typealiases to its own file.

E.g. if a file named test.kt contains a class Foo and some
functions/properties, the output will contain two files: TestKt.kotlin_metadata
and Foo.kotlin_metadata. Each one of this files contains the serialized
BuiltIns message (see builtins.proto)
2016-11-25 20:50:10 +03:00
..
2016-11-25 14:07:31 +03:00

JavaScript Translation

This module performs the translation of Kotlin source code to JavaScript.

There are various Kotlin APIs to JavaScript environments and libraries in the js.libraries project.

Compiling the standard Kotlin library to JavaScript

Reusing JVM based test cases in JavaScript

Any Kotlin test cases using the org.junit.Test annotation and the kotlin.test package, such as this test case are automatically converted to JavaScript using QUnit.

This allows the test cases to be ran directly in a web page in any web browser.

Using the Kotlin Library in JavaScript

There is a simple sample which shows how to use the Kotlin Standard Library from inside JavaScript in a web page or in a JVM using kool.io's JavaFX browser

Contributing

We love contributions! The JavaScript translation could really use your help! If you fancy contributing: