This directory contains a set of samples demonstrating how one can work with Kotlin/Native. The samples can be
built using Gradle build tool. See README.md
in sample directories to learn more about specific samples and
the building process.
androidNativeActivity
- Android Native Activity rendering 3D graphics using OpenGLEScalculator
- iOS Swift application, using Kotlin/Native code compiled into the frameworkcocoapods
- A Kotlin/Native application using theAFNetworking
library from CocoaPods.csvparser
- simple CSV file parser and analyzerechoServer
- TCP/IP echo servergitchurn
- program interoperating withlibgit2
for GIT repository analysisgtk
- GTK3 interoperability examplehtml5Canvas
- WebAssembly examplelibcurl
- using of FTP/HTTP/HTTPS client librarylibcurl
nonBlockingEchoServer
- multi-client TCP/IP echo server using co-routinesobjc
- AppKit Objective-C interoperability example for macOSopengl
- OpenGL/GLUT teapot examplepython_extension
- Python extension written in Kotlin/Nativetensorflow
- simple client for TensorFlow Machine Intelligence librarytetris
- Tetris game implementation (using SDL2 for rendering)uikit
- UIKit Objective-C interoperability example for iOSvideoplayer
- SDL and FFMPEG-based video and audio playerwin32
- trivial Win32 GUI applicationworkers
- example of using workers API
Note: If the samples are built from a source tree (not from a distribution archive) the compiler built from
the sources is used. So you must build the compiler and the necessary platform libraries by running
./gradlew bundle
from the Kotlin/Native root directory before building samples (see
README.md for details).
Alternatively you may remove a line org.jetbrains.kotlin.native.home=<...>
from all gradle.properties
files.
In this case the Gradle plugin downloads and uses a default compiler for this plugin version.
One may also build all the samples with one command. To build them using Gradle run:
./gradlew buildAllSamples