Kotlin C++ C Groovy Protocol Buffer JavaScript Other
Permalink
Failed to load latest commit information.
Interop Extracted Konan dependent pieces of Stub Generator to separate compon… Oct 6, 2017
backend.native fix gradle 4.2 warning on windows (#937) Oct 13, 2017
buildSrc build: Use Gradle 4.2 Oct 4, 2017
cmd [kotlin compiler][update] 1.1-20171004.235336-906 Oct 12, 2017
common Moved clang flags out of the root build.gardle. Jul 12, 2017
contrib WebAssembly effort (#721) Jul 14, 2017
dependencies [kotlin compiler][update] 1.1-20171004.235336-906 Oct 12, 2017
gradle build: Use Gradle 4.2 Oct 4, 2017
klib Added a dependence between objc.def and osx.def. Oct 13, 2017
libclangext Extend libclang API Aug 16, 2017
licenses regex: Add licenses Jun 19, 2017
llvmDebugInfoC [debug] make lldb printes more robust Sep 27, 2017
performance [build][performance] g/c unused lines Sep 13, 2017
runtime Logging remnants Oct 5, 2017
samples Renamed objc klib in the sample to objective_c to eliminate naming Oct 13, 2017
shared Custom progress reporting for dependency downloader Oct 10, 2017
tools [kotlin compiler][update] 1.1-20171004.235336-906 Oct 12, 2017
utilities Platform lib fixes and improvements (#925) Oct 10, 2017
.gitignore Enable performance testsuite Aug 3, 2017
.gitmodules Added JB copyright (#417) Mar 30, 2017
CHANGELOG.md v0.3.2 preparations Sep 5, 2017
DEBUGGING.md [doc][debug] lldb pretty printers Sep 21, 2017
DISTRO_README.md Doc tweaks (#686) Jun 20, 2017
FAQ.md Doc tweaks (#686) Jun 20, 2017
GRADLE_PLUGIN.md readme: Fix a typo Sep 29, 2017
HACKING.md Remote test execution for cross compiled tests. Run it like: Mar 27, 2017
INTEROP.md Updated documentation to reflect static library inclusion facility. Sep 13, 2017
LIBRARIES.md Fix typo in LIBRARIES.md (#702) Jun 24, 2017
LICENSE Add missing LICENSE file Apr 28, 2017
README.md Update README.md Oct 5, 2017
RELEASE_NOTES.md v0.3.1 preparations. (#806) Aug 24, 2017
RELEASE_PROCESS.md Fix couple typos. Aug 24, 2017
build.gradle [kotlin compiler][update] 1.1-20171004.235336-906 Oct 12, 2017
gradle.properties [kotlin compiler][update] 1.1-20171004.235336-906 Oct 12, 2017
gradlew build: Use Gradle 4.2 Oct 4, 2017
gradlew.bat Add Gradle wrapper. (#19) Oct 27, 2016
settings.gradle unit-tests: Minor fixes before review Sep 25, 2017

README.md

official project

Kotlin/Native

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

Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS, 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.

To compile from sources use following steps.

First download dependencies:

./gradlew dependencies:update

Then build the compiler and standard library:

./gradlew dist

To build standard library for cross-targets use:

./gradlew cross_dist

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

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

For an optimized compilation use -opt:

kotlinc hello.kt -o hello -opt

For some tests, use:

./gradlew backend.native:tests:run

To generate interoperability stubs create library definition file (take a look on samples/tetris/.../sdl.def) and run cinterop tool like this:

cinterop -def lib.def

See provided samples and INTEROP.md for more details.

Interop tool generates library in .klib library format, see LIBRARIES.md for more details on the file format.