*42deb7db48- (tag: build-1.4.0-dev-508) KT-34582 Exclude `kotlin.coroutines.experimental` package from completion and auto-import (21 hours ago) <Roman Golyshev> *8399614de8- (tag: build-1.4.0-dev-504) Move muted test failing on all platforms to mute-common (2 days ago) <Pavel Kirpichenkov> *a98f36bce4- (tag: build-1.4.0-dev-499) Reorganize existing Closeable/AutoCloseable.use tests (2 days ago) <Ilya Gorbunov> *941de655c4- Add contract for 'use' (2 days ago) <Toshiaki Kameyama> *043eddb432- (tag: build-1.4.0-dev-498) Cleanup: use effects introduced by contracts of assert* functions (2 days ago) <Ilya Gorbunov> *04fe0dc795- (tag: build-1.4.0-dev-491) Minor: enable commit message inspections in IDEA (3 days ago) <Zalim Bashorov> *9cf1a2b404- [Build] Remove the property to skip JS IR BE tests (3 days ago) <Zalim Bashorov> *9557034cf7- [Build] Mark tmp dir in the root of project as excluded (3 days ago) <Zalim Bashorov> *40812cd116- (tag: build-1.4.0-dev-488) Mute quickfix test (KT-35728) (3 days ago) <Pavel Kirpichenkov> *2d21b82501- [NI] Remove hack for special functions (3 days ago) <Pavel Kirpichenkov> *9a12641fde- (tag: build-1.4.0-dev-483) Allow parallel access to klib zip filesystem (3 days ago) <Alexander Gorshenev> *ddda93ad96- (tag: build-1.4.0-dev-472) Mute flaky JavaAgainstKotlin.testUsingMutableInterfaces (3 days ago) <Nikolay Krasko> *e20c66011a- Enable mute tests feature for BuiltInDecompilerTest (3 days ago) <Nikolay Krasko> *28e23f0aa8- Mute flaky step over tests on Android Studio (3 days ago) <Nikolay Krasko> *11e4b710b5- Mute GradleMigrateTest.testMigrateStdlib in AS (3 days ago) <Nikolay Krasko> *77edfed764- Mute tests for preferring JDK classes in completion and auto-import in 191 and 192 (KT-35709) (3 days ago) <Nikolay Krasko> *74e2c98426- Fix test data for QuickFixTestGenerated.SupertypeInitialization in 191 (3 days ago) <Nikolay Krasko> *0d48855333- Mute JavaToKotlinConverterSingleFileTestGenerated in 191 (3 days ago) <Nikolay Krasko> *28eb6a223d- Fix UpdateConfigurationQuickFixTest.testEnableCoroutinesFacet test (3 days ago) <Nikolay Krasko> *4c28e0dec3- Split tests to common and platform parts (3 days ago) <Nikolay Krasko> *570b522e8e- Minor: sort tests in mute database (3 days ago) <Nikolay Krasko> *6da3c2fa4e- (tag: build-1.4.0-dev-469) FIR2IR: set parent correctly (~) for anonymous functions (3 days ago) <Mikhail Glukhikh> *a653feb2dc- (tag: build-1.4.0-dev-467) Scripting: use VFS events instead of document changes to track changes outside of IDE (KT-35557) (3 days ago) <Natalia Selezneva> *6bf0e4b1a9- Simplify check for that gradle script configurations is up to date (3 days ago) <Natalia Selezneva> *3dfbd824e4- Implement persistent storage for time stamps of files that affect build script configuration (KT-3556) (3 days ago) <Natalia Selezneva> *ecb05ace91- Scripting: extract API to check if script is related to any gradle project (3 days ago) <Natalia Selezneva> *716036a000- (tag: build-1.4.0-dev-465) RemoveModifierFix: fix message for 'companion object' (3 days ago) <Toshiaki Kameyama> *3dc58bc995- (tag: build-1.4.0-dev-464) [FIR2IR] Fix translating primitive array types (3 days ago) <Juan Chen> *1cf582e9ed- FIR2IR: set extension receiver for anonymous functions (3 days ago) <Mikhail Glukhikh> *aa796e962a- FIR2IR (minor): remove duplicate of generateErrorCallExpression (3 days ago) <Mikhail Glukhikh> *95dd322bf0- (tag: build-1.4.0-dev-461) Update FIR diagnostics test (3 days ago) <Mikhail Zarechenskiy> *e4b2c238c7- (tag: build-1.4.0-dev-458, minamoto/ir/inliner/inliner-no-local-object-copier-1/kotlin) FIR2IR: temporarily allow null receivers & use findIr*Receiver also for fields (3 days ago) <Mikhail Glukhikh> *338281e05f- [FIR TEST]: add test for KT-35730 (3 days ago) <Mikhail Glukhikh> *15f373a864- FIR2IR: support object receiver case (this fixes 24 black box tests) (3 days ago) <Mikhail Glukhikh> *f3b5ee4cba- FIR2IR: fix assertion in getIrFunctionSymbol (anonymous function case) (3 days ago) <Mikhail Glukhikh> *5e426fdc71- [FIR] Optimization & checking fix: remove usage of dispatchReceiverValue (3 days ago) <simon.ogorodnik> *686965c0d3- [FIR] Code cleanup: get rid of typeProvider hack (3 days ago) <simon.ogorodnik> *caf02806d5- (tag: build-1.4.0-dev-456, tag: build-1.4.0-dev-447) NI: Fix resolution ambiguity for references returned from lambda (3 days ago) <Denis Zharkov> *534718794c- Minor. Extract PSICallResolver::createCallableReferenceKotlinCallArgument (3 days ago) <Denis Zharkov> *840acbac68- Minor. Make properties in KotlinResolutionCallbacksImpl private (3 days ago) <Denis Zharkov>
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-libsmay be needed - on recent Ubuntu
apt install libncurses5is 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.