Hello community, I am playing around with the Kotl...
# kotlin-native
j
Hello community, I am playing around with the Kotlin/Native compiler. Trying to compile using the command line (I'm using a MacBook). My terminal does not recognize the
kotlinc-native
command. Looking at the bin folder, i see all of the other compilers (
kotlinc
,
kotlinc-js
,
kotlinc-jvm
, etc.) but no
kotlinc-native
. I believe I am on the latest version (1.3.70-release-328 (JRE 13.0.1+9)). I was wondering if anyone else faced this issue or if it was just me. Couldn't really find anything helpful about it when googling the problem.
a
Hello! It seems like you’re looking at the Kotlin compiler folder, the Kotlin/Native should be downloaded separately, see GH release section: https://github.com/JetBrains/kotlin/releases/tag/v1.3.70
j
I have downloaded that folder, and unzipped it, but I am unsure of what to do next.
even looking in cli/bin, it looks like kotlinc-native is missing.
a
There should be its own /bin/ folder in this archive.
j
I had a question. Some documentation says that the Kotlin/Native command line tool "ships as part of the standard Kotlin distribution" (see second sentence in the Obtaining the Compiler section https://kotlinlang.org/docs/tutorials/native/using-command-line-compiler.html#obtaining-the-compiler). So this made me think that I could download Kotlin and automatically have access to the
kotlinc-native
command, and thus access to the kotlin/native compiler. I am curious about what the sentence meant. I am misunderstanding. What does it mean by "standard Kotlin distribution"?
I believe that I had not installed kotlin/native correctly, so I am installing it now btw
a
Oh. This page seems to be referring to the next fact. Source code of the Native compiler is situated in a separate GitHub repository, with it’s own 'releases' section(see https://github.com/JetBrains/kotlin-native/releases/tag/v1.3.70). But, assets there consist of the archived source code. Pre-built Kotlin/Native compiler is being distributed only at the Kotlin repo. It should work as-is, right after unpacking.
j
Ok, I was working off of the build-1.4.0-dev-4514 release. The download link on the documentation page (https://kotlinlang.org/docs/tutorials/native/using-command-line-compiler.html#compiling-the-code-from-the-console) led me there. I assumed I had to download the latest release. I hope the documentation can be updated to lead to the link you have given me.
👌 1
You've been a ton of help, Artyom! Thanks a bunch! I will try the distribution that you gave me.