Giter VIP home page Giter VIP logo

kotlin-native's Introduction

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 developer is willing to produce reasonably-sized self-contained program without 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 (currently, iOS on Mac OSX and Raspberry Pi on Linux hosts) 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.

kotlin-native's People

Contributors

abreslav avatar alefas avatar alejes avatar alexander-gorshenev avatar bennyhuo avatar dead-off avatar dsavvinov avatar e5l avatar eabatalov avatar elect86 avatar homuroll avatar ilmat192 avatar juliuskunze avatar kevinw1998 avatar kjellwinblad avatar konstantinanisimov avatar matklad avatar max-kammerer avatar miquelbeltran avatar olonho avatar svyatoslavscherbina avatar udalov avatar vvlevchenko avatar yole avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.