*e5a1040dbd- (HEAD -> master, tag: build-1.3.60-dev-2066, origin/master, origin/HEAD) [KLIB] Fix references to private top-level typealias via type abbreviation (15 hours ago) <Roman Artemev> *40ebe4063c- (tag: build-1.3.60-dev-2063) [FIR] Refactor collecting statistics in modularized tests (16 hours ago) <Dmitriy Novozhilov> *6a75a9072c- [FIR] Remove redundant resolution stage from resolution of synthetic function calls (16 hours ago) <Dmitriy Novozhilov> *ef5ac7df93- [FIR] Don't create member function for each when and try expression (16 hours ago) <Dmitriy Novozhilov> *996d9a5d90- (tag: build-1.3.60-dev-2055) Pill: Enable Pill for FIR visualizer modules (19 hours ago) <Yan Zhulanow> *d1285d9dbf- (tag: build-1.3.60-dev-2054) Fix performanceTests for 192; Add perfCounters (20 hours ago) <Vladimir Dolzhenko> *8fa67f0478- (tag: build-1.3.60-dev-2053) Add correct modification tracking on UltraLight classes (20 hours ago) <Igor Yakovlev> *b2002d56bd- (tag: build-1.3.60-dev-2052) New J2K: move type calculation to expression node (21 hours ago) <Ilya Kirillov> *be94eb5405- New J2K: remove extra interfaces in AST structure & split AST definitions to proper files (21 hours ago) <Ilya Kirillov> *fd85c2bb43- New J2K: use mutable lists for storing comments (21 hours ago) <Ilya Kirillov> *5d99419e9c- New J2K: check call name before resolving in post-processing (21 hours ago) <Ilya Kirillov> *dca0dc1933- New J2K: do not recalculate types for binary & unary expressions and rewrite assignment expressions conversion (21 hours ago) <Ilya Kirillov> *c93d810685- New J2K: introduce TypeFactory for creating J2K types (21 hours ago) <Ilya Kirillov> *047bb07727- New J2K: store reference to conversionContext & symbolProvider in conversion (21 hours ago) <Ilya Kirillov> *eb690f451e- New J2K: do not recreate typeElement on updating type (21 hours ago) <Ilya Kirillov> *f61bb5aa39- New J2K: implement mutability inference in post-processing (21 hours ago) <Ilya Kirillov> *c28515be59- New J2K: use nullable type for unknown for public declarations & prepare for mutability inference (21 hours ago) <Ilya Kirillov> *0040490daf- (tag: build-1.3.60-dev-2048) [FIR] Fix FIR modularized tests after switch to 192 (22 hours ago) <Simon Ogorodnik> *fc4bcfb536- (tag: build-1.3.60-dev-2043) Add test on yarn downloading non-default version - Previously we skipped yarn setup, if yarn folder exists, not paying attention on what concrete yarn version installed (24 hours ago) <Ilya Goncharov> *8a6ee66f81- Yarn manipulation in build script - Remove yarn folder in task inside build script to not import GradleUserHomeLookup - Check yarn folder existence in task inside build script (24 hours ago) <Ilya Goncharov> *48c06aeeba- Add test for yarn setup by kotlinYarnSetup task (24 hours ago) <Ilya Goncharov> *f609e21c82- (tag: build-1.3.60-dev-2042) Remove asserts, that failed build - TeamCity cannot run browser tests yet, so disable such assertions related with browser tests checking (24 hours ago) <Ilya Goncharov> *49391e64d6- Add testing for karma use puppeteer for downloading chrome (24 hours ago) <Ilya Goncharov> *18f2ba889e- Make envJsCollector as map (24 hours ago) <Ilya Goncharov> *3bfb980a39- Collect env variables to separate collector (24 hours ago) <Ilya Goncharov> *613391d00b- Add puppeteer for Chrome browsers (24 hours ago) <Ilya Goncharov> *df646233ef- Fix KarmaConfig file name (24 hours ago) <Ilya Goncharov>
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 10.2
- 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
To include Kotlin/Native Shared in a composite build and build against
it, use the sharedProjectPath project property:
./gradlew dist -PsharedProjectPath=path/to/kotlin/native/shared
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.