In order to install Kotlin Native on our machine, we need to compile it from the source. Follow these steps to download the source and compile it:
- Clone the Kotlin Native compiler source using the following command:
git clone https://github.com/JetBrains/kotlin-native.git
- Let's switch to the cloned directory using cd kotlin-native.
- Download the dependencies using ./gradlew dependencies:update.
- Then build the compiler and libraries. We should use ./gradlew bundle, but it can take a few hours to build. Therefore, we will build only with the host compiler and the libraries using ./gradlew dist distPlatformLibs, which should build pretty quickly.
- Add the Kotlin compiler to the environment variables (the steps to ...