Kotlin/Native v0.3 is out


We’re happy to announce the release of Kotlin/Native v0.3. We are going to the new lands! With the release of version v0.3 Windows is supported as both a compilation host and execution target, and Google Android devices as an execution target with native activities. So Windows API ‘Hello World’ may look as easy as:

Android native activity’s event processing:

Debugging

With this release we support source level debugging (single-stepping only). For example, try

Libraries

Last, but surely, not the least, we introduced a new library format, called .klib, which is intended to be the default distribution format for Kotlin/Native libraries. Native libraries and frameworks could be easily interoperated with using .klib and used with Kotlin/Native compiler by just specifying -library library command line flag or library Gradle plugin option. Interop tool already produces .klib format files by default. For more details on library format see here.

Getting the bits

Binaries could be downloaded below:

Bugs and issues could be reported using Kotlin bug tracker.

About Nikolay Igotti

Kotlin/Native Tech Lead
This entry was posted in Android, Native, Releases. Bookmark the permalink.

26 Responses to Kotlin/Native v0.3 is out

  1. Fantastic! Great work guys, keep it up!

  2. soywiz says:

    Great news!

    BTW. Something seems to be wrong with downloadable dependencies:

  3. Zack says:

    Where did ‘or’ and ‘and’ keywords come from? Did I miss an announcement? Are || and && being switched to bitwise comparisons?

  4. Pingback: Kotlin/Native v0.3 发布,将 Kotlin 编译成机器码

  5. Pingback: Kotlin/Native läuft jetzt auch auf Windows - JAXenter

  6. Benny says:

    Wow, Apple ( Swift ) can learn a thing or two from jetbrains.

  7. Benny says:

    From my understanding the klib does not support dynamic loading?

    • Nikolay Igotti says:

      Yes, .klib is intended as mechanism of compile-time linking, not the runtime one.

      • Benny says:

        Is there going to be a native run time version in the future?

        • Nikolay Igotti says:

          Do not think so. For dynamic loading in runtime platform mechanisms, such as shared objects (.so) or dynamic libraries (.dll) could be used. In general, Kotlin/Native adopts closed world approach, so if you need truly pluggable architecture, maybe Kotlin/JVM could be a better fit. But surely, nothing prevents creating shared objects from Kotlin/Native and using platform mechanisms to do load them.

  8. Nikolay Igotti says:

    Yes, sorry for inconvenience, fixed version was uploaded.

  9. Cyparu says:

    @moderator: What happened with my win32 comments ?

    • Nikolay Igotti says:

      I have removed this thread of discussion, to avoid unneeded clobber. It was a typo in distributive, which shall be fixed by now. Could you please check that it is no longer a problem? Thanks for reporting this issue!

      • Sean Flanigan says:

        Well I’m glad Cyparu asked, because I had no idea it had been fixed.

        The win32 sample seems to work now, thanks!

  10. Pingback: Kotlin/Native v0.3 is out | Kotlin Blog – Subproject 741

  11. bxq says:

    I try to build samples and the following error occurs:

    C:\prj\KotlinNativeWindows\samples>gradle build –stacktrace
    FAILURE: Build failed with an exception.

    What went wrong:
    Execution failed for task ‘:concurrent:compileCpp’.

    A problem occurred starting process ‘command ‘./buildCpp.sh”

    Try:
    Run with –info or –debug option to get more log output.
    Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:concurrent:compileCpp’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:101)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:60)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:242)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:235)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:224)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:121)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:77)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:102)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:96)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:612)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:567)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:96)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process ‘command ‘./buildCpp.sh”
    at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:199)
    at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:330)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
    at org.gradle.internal.operations.BuildOperationIdentifierPreservingRunnable.run(BuildOperationIdentifierPreservingRunnable.java:39)
    … 3 more
    Caused by: net.rubygrapefruit.platform.NativeException: Could not start ‘./buildCpp.sh’
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
    at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
    at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
    … 4 more
    Caused by: java.io.IOException: Cannot run program “./buildCpp.sh” (in directory “C:\prj\root-experiment\KotlinNativeWindows\samples\concurrent”): CreateProcess error=2, The system cannot find the file specified
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
    … 7 more
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    … 8 more

    BUILD FAILED in 4s

  12. bxq says:

    When I try to build in ‘sample\concurrent’ directory, I get the following error:

    C:\prj\root-experiment\KotlinNativeWindows\samples\concurrent>gradle build –stacktrace

    FAILURE: Build failed with an exception.

    What went wrong:
    Execution failed for task ‘:concurrent:compileCpp’.

    A problem occurred starting process ‘command ‘./buildCpp.sh”

    Try:
    Run with –info or –debug option to get more log output.
    Exception is:
    org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:concurrent:compileCpp’.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:100)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
    at org.gradle.api.internal.tasks.execution.SkipCachedTaskExecuter.execute(SkipCachedTaskExecuter.java:101)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
    at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:60)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:242)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
    at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:235)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:224)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:121)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:77)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:102)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:96)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:612)
    at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:567)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:96)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process ‘command ‘./buildCpp.sh”
    at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:199)
    at org.gradle.process.internal.DefaultExecHandle.failed(DefaultExecHandle.java:330)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:86)
    at org.gradle.internal.operations.BuildOperationIdentifierPreservingRunnable.run(BuildOperationIdentifierPreservingRunnable.java:39)
    … 3 more
    Caused by: net.rubygrapefruit.platform.NativeException: Could not start ‘./buildCpp.sh’
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
    at net.rubygrapefruit.platform.internal.WindowsProcessLauncher.start(WindowsProcessLauncher.java:22)
    at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
    at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
    … 4 more
    Caused by: java.io.IOException: Cannot run program “./buildCpp.sh” (in directory “C:\prj\root-experiment\KotlinNativeWindows\samples\concurrent”): CreateProcess error=193, %1 is not a valid Win32 application
    at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
    … 7 more
    Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
    … 8 more

    BUILD FAILED in 4s

Comments are closed.