Vasily Levchenko edd619ef70 [kotlin compiler][update][fixup] 1.4.0-dev-588
* 98f5c5aa95 - (tag: build-1.4.0-dev-588) JVM_IR: Preserve annotations on inline class replacement methods. (4 days ago) <Mads Ager>
* e7835fecfc - (tag: build-1.4.0-dev-587) JVM_IR: fix a couple of inline class reflection issues. (4 days ago) <Mads Ager>
* 2ebb797e61 - (tag: build-1.4.0-dev-582) JVM_IR: Remove accessor for internal inline class properties. (4 days ago) <Mads Ager>
* d27593aeda - (tag: build-1.4.0-dev-577) PSI2IR: SAM conversion in method arguments of out-projected Java classes (4 days ago) <Dmitry Petrov>
* a55bce801e - (tag: build-1.4.0-dev-575) Update year in the license to 2020 (4 days ago) <Alexander Udalov>
* e0b9ffa780 - Regenerate builtins sources (4 days ago) <Alexander Udalov>
* d73e6c855b - (tag: build-1.4.0-dev-565) Regenerate FIR tree (5 days ago) <Alexander Udalov>
* 8a4510c21b - (tag: build-1.4.0-dev-563) Regenerate tests (5 days ago) <Alexander Udalov>
* a55296db26 - (tag: build-1.4.0-dev-556) Mute flaky GradleKtsImportTest.testCompositeBuild (7 days ago) <Vyacheslav Gerasimov>
* 1b00996c86 - (tag: build-1.4.0-dev-553) Mute failing test-kotlin-version-in-manifest (7 days ago) <Vyacheslav Gerasimov>
* 8054e2960e - (tag: build-1.4.0-dev-551) PSI2IR: Post-process return expressions based on expected return type (7 days ago) <Dmitry Petrov>
* 0e4e5ac287 - (tag: build-1.4.0-dev-547) Update nullability assertion tests that use newer Java features (7 days ago) <Dmitry Petrov>
* d622542824 - (tag: build-1.4.0-dev-536) PSI2IR: Fix delegated members generation (8 days ago) <Dmitry Petrov>
* cc0b231b3b - (tag: build-1.4.0-dev-534) Convert SyntheticMethodForAnnotatedPropertyGenTest to a box test (8 days ago) <Alexander Udalov>
* 8f30b25b24 - Minor, fix some codegen tests for language version 1.4 (8 days ago) <Alexander Udalov>
* e2a42446ed - Use getter names for $annotations methods in most codegen tests (8 days ago) <Alexander Udalov>
* 330dd789de - (tag: build-1.4.0-dev-524) Minor: mute test in FIR+JVM_IR (8 days ago) <Dmitry Petrov>
* c7d39b612c - (tag: build-1.4.0-dev-521) Simplify adding Kotlin sdk by inlining internals of ProjectSdksModel (8 days ago) <Nikolay Krasko>
* 70067bc9bf - Better fix for compiler plugin test initialization (8 days ago) <Nikolay Krasko>
* 1715f1a864 - (tag: build-1.4.0-dev-517) [FIR] Refactoring: create use-site scopes via scope provider (8 days ago) <Simon Ogorodnik>
* 5f08fe88a5 - [FIR] Move ScopeSession to fir:tree (8 days ago) <Mikhail Glukhikh>
* 98bf0e278f - (origin/rr/pdn_jvmir_vararg) Fix problem with empty vararg of boxed primitives in JVM_IR (8 days ago) <Dmitry Petrov>
* 0667ee9796 - Minor: optimize imports (8 days ago) <Dmitry Petrov>
* 76e7a9ba4a - Generate instructions as text in case of other exceptions (8 days ago) <Dmitry Petrov>
* 4b6202c902 - (tag: build-1.4.0-dev-515, tag: build-1.4.0-dev-511) JVM_IR. Support inlining of bound CR (8 days ago) <Mikhael Bogdanov>
2020-01-08 13:54:46 +01:00
2019-11-04 15:13:27 +03:00
2019-12-27 11:01:09 +03:00
2019-11-28 12:20:29 +07:00
2019-12-25 14:14:53 +03:00
2019-03-21 14:16:25 +03:00
2017-03-30 09:51:58 +03:00
2019-12-18 16:58:28 +03:00
2019-10-25 16:05:35 +03:00
2019-12-02 09:55:51 +03:00
2019-11-28 12:20:29 +07:00
2019-07-10 15:29:45 +07:00
2019-12-09 10:14:07 +07:00
2018-09-13 11:48:42 +03:00
2017-04-28 17:05:20 +02:00
2019-01-30 19:11:11 +03:00
2019-09-28 09:53:20 +03:00
2019-09-28 09:53:20 +03:00

official project version

Kotlin/Native

Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.

Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS or embedded targets), or where a developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.

Prerequisites:

  • install JDK for your platform, instead of JRE. The build requires tools.jar, which is not included in JRE;
  • on macOS install Xcode 11
  • on Fedora 26+ yum install ncurses-compat-libs may be needed
  • on recent Ubuntu apt install libncurses5 is needed

To compile from sources use following steps:

First, download dependencies:

./gradlew dependencies:update

Then, build the compiler and libraries:

./gradlew bundle

To build with experimental targets support compile with -Porg.jetbrains.kotlin.native.experimentalTargets.

The build can take about an hour on a Macbook Pro. To run a shorter build with only the host compiler and libraries, run:

./gradlew dist distPlatformLibs

To include Kotlin compiler in composite build and build against it, use the kotlinProjectPath project property:

./gradlew dist -PkotlinProjectPath=path/to/kotlin/project

It's possible to include in a composite build both Kotlin compiler and Kotlin/Native Shared simultaneously.

After that, you should be able to compile your programs like this:

export PATH=./dist/bin:$PATH
kotlinc hello.kt -o hello

For an optimized compilation, use -opt:

kotlinc hello.kt -o hello -opt

For tests, use:

./gradlew backend.native:tests:run

To generate interoperability stubs, create a library definition file (refer to samples/tetris/.../sdl.def), and run the cinterop tool like this:

cinterop -def lib.def

See the provided samples and INTEROP.md for more details.

The Interop tool generates a library in the .klib library format. See LIBRARIES.md for more details on this file format.

S
Description
The Kotlin Programming Language.
Readme 2.1 GiB
Languages
Kotlin 79.9%
Java 10.4%
Swift 4.3%
C 2.8%
C++ 2.1%
Other 0.3%