Vasily Levchenko b75536581b [kotlin compiler][update] 1.4.0-dev-3251
* 3eed0609b2 - (tag: build-1.4.0-dev-3251) Brought back mppKlibs guard lost in rebase (vor 4 Stunden) <Alexander Gorshenev>
* 36ebbc49f4 - KotlinExpressionMover: trailing comma support (vor 5 Stunden) <Dmitry Gridin>
* 72c8b38864 - KotlinExpressionMover: convert to Kotlin (vor 5 Stunden) <Dmitry Gridin>
* bca9242492 - KotlinExpressionMover: rename .java to .kt (vor 5 Stunden) <Dmitry Gridin>
* 56064f2a92 - JoinLines: add tests (vor 5 Stunden) <Dmitry Gridin>
* feaa53c4f2 - Formatter: shouldn't format property chains (vor 5 Stunden) <Dmitry Gridin>
* 522eeae062 - (tag: build-1.4.0-dev-3240) FIR2IR: standardize expression with smart cast conversion (vor 6 Stunden) <Mikhail Glukhikh>
* d1fac6dce1 - FIR2IR: declare receivers for all accessors of extension properties (vor 6 Stunden) <Mikhail Glukhikh>
* 8c155578f7 - FIR2IR: generate both dispatch & extension receiver without 'else if' (vor 6 Stunden) <Mikhail Glukhikh>
* 4f6fe1d0ca - [FIR]: fix translation of top-level property accesses like array.indices (vor 6 Stunden) <Juan Chen>
* c9658eb6e4 - (tag: build-1.4.0-dev-3237) Adjust tests due to keep imports for extension functions used in kdoc (vor 6 Stunden) <Vladimir Dolzhenko>
* afd71d3d19 - Adjust tests due to "Remove argument" quick fix for TOO_MANY_ARGUMENTS (vor 6 Stunden) <Vladimir Dolzhenko>
* b047d78580 - (tag: build-1.4.0-dev-3236) Minor: update testData for IR bytecode text and unmute test (vor 7 Stunden) <Dmitry Petrov>
* 0b9fc1541d - (tag: build-1.4.0-dev-3235, tag: build-1.4.0-dev-3233) [NI] Don't try inferring variables for effectively empty system (vor 7 Stunden) <Mikhail Zarechenskiy>
* fe71d5256c - (tag: build-1.4.0-dev-3231, tag: build-1.4.0-dev-3222) [Minor] Refactor IR Suspend Main code to not use intrinsic (vor 20 Stunden) <Kristoffer Andersen>
* a3d85e108f - (tag: build-1.4.0-dev-3218) JVM_IR: keep `suspend fun` return type in IrCalls (vor 23 Stunden) <pyos>
* d982203d56 - (tag: build-1.4.0-dev-3209) [JVM_IR] Handle big arity suspend functions in existing lowering. (vor 27 Stunden) <Mads Ager>
* e406669190 - (tag: build-1.4.0-dev-3206) Invert if condition intention: don't add unnecessary 'continue' (vor 29 Stunden) <Toshiaki Kameyama>
2020-02-26 07:00:30 +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-03-21 14:16:25 +03:00
2020-02-19 10:48:24 +01: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
2020-02-06 11:12:49 +03: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%