Repository navigation
Kotlin/Native on macOS, Linux and Windows; GraalVM by default - #8
Merged
Merged
Conversation
The native transport (JNI or a native image's entry points) is shared by every Kotlin/Native target. On the desktop the runtime is loaded from nja/ next to the executable (or NJA_HOME): the facades' native image, a shared library built by the host's native-image, or a JDK's libjvm. GRAALVM is the default runtime everywhere (Android keeps the JVM on non-Linux hosts unless set). Buffers are freed by the side that allocated them (Windows' C runtimes differ); GraalLink drops StackValue (virtual threads); IosLink becomes JniLink. README rewritten.
Kotlin PSI wants \n: a façade checked out on Windows (\r\n) lost members in the generated client. Kotlin/Native doesn't run on Linux arm64 hosts: CI links linuxArm64's tests on Linux x64, and the README says how its image ships.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
macosArm64,macosX64,linuxX64,linuxArm64,mingwX64. One transport for every Kotlin/Native target (nativeMain): JNI, or a native image's entry points. On the desktop the runtime is loaded fromnja/next to the executable (orNJA_HOME):GRAALVM: a shared library built by the host'snative-image --shared(libnja.dylib,libnja.so,nja.dll): no kit needed;JVM: a JDK'slibjvm, fromnja/runtimeorJAVA_HOME.Binaries don't link the runtime, so they still cross-compile; an image builds on its own host only (a warning says so otherwise).
androidRuntimeis set (an Android image builds on Linux only).desktopRuntime,graalvmRelease; GraalVM CE on Windows hosts (zip,native-image.cmd, no symbolic links).nja_graal_free, and a release function given with the upcall.GraalLinkdropsStackValue(it throws on virtual threads).IosLinkbecomesJniLink.test-desktop.yml, both runtimes on macOS, Linux x64/arm64 and Windows.Tested locally
macosArm64Test: 2,008/2,008 with GraalVM, 2,008/2,008 with the JVM.iosSimulatorArm64Test(GraalVM, the new default): 2,008/2,008.