Hacker News new | ask | show | jobs
by floatboth 2855 days ago
Not to be confused with https://github.com/JetBrains/kotlin-native — this is the Java version compiled with Excelsior JET, a proprietary AOT Java compiler thing.
3 comments

I wonder why they have not used jlink + jaotc ?

Maven is already able to compile a the code with Java 6/Java 8 and the module-info with Java 9. With jlink, you can then create your own jdk and AOT the part of the code you want with jaotc.

Maybe those tools are too new and the perf are not great ?

Perhaps the compiled output of jaotc is not suitable for distribution, but is intended more as an equivalent of ngen in .NET?

JEP 295 says: "AOT compilation must be executed on the same system or a system with the same configuration on which AOT code will be used by Java application."

So it's the compiler that's native, not the output. Or?
The submission is about the compiler which is now shipped as native binaries that have been compiled using ExclesiorJET AOT.

There is also a compiler for Kotlin that builds native binaries instead of JVM bytecode. It is a different project from the same company.

sorry dumb question (i think that answer is yes): can i use this to build a statically linked binary of my kotlin app?
You can use Kotlin Native to do that — if your app doesn't depend on anything JVM-specific (apart from the small subset of basic things reimplemented in Native), of course.
You can use SubstrateVM to do that for free, if you don't use too much dynamic coding.