# Native

**URL:** https://discuss.kotlinlang.org/c/native/15.md?page=1

[Latest](https://discuss.kotlinlang.org/latest.md) · [Categories](https://discuss.kotlinlang.org/categories.md)

**Page:** 2

---

## [WEB page parsing in Kotlin Native](https://discuss.kotlinlang.org/t/web-page-parsing-in-kotlin-native/17420)

<div class="topic-metadata">

**Author:** [@rodnikyk](https://discuss.kotlinlang.org/u/rodnikyk)\
**Replies:** 4\
**Last updated:** [November 16, 2023, 9:47pm UTC](https://discuss.kotlinlang.org/t/web-page-parsing-in-kotlin-native/17420 "2023-11-16T21:47:33Z")

</div>

I’m a newbie Kotlin programmer. I’ve been using jsoup in my project reading the WEB page as follows: import org.jsoup.Jsoup … val doc = Jsoup.connect("http://...WEB address goes there").get() val html = doc.outerHtml(…

---

## [Custom Clang version with Kotlin/Native](https://discuss.kotlinlang.org/t/custom-clang-version-with-kotlin-native/28150)

<div class="topic-metadata">

**Author:** [@paxbun](https://discuss.kotlinlang.org/u/paxbun)\
**Replies:** 2\
**Last updated:** [February 18, 2024, 4:53am UTC](https://discuss.kotlinlang.org/t/custom-clang-version-with-kotlin-native/28150 "2024-02-18T04:53:06Z")

</div>

Hi, I’m trying to link a Rust MinGW static library to a Kotlin/Native MinGW library on macOS. I’m using Rust 1.75 with Kotlin 1.9.21. I encounter a linker error like the following: e: /Users/paxbun/.konan/dependencies/…

---

## [Run MinGW executable with wine via Gradle?](https://discuss.kotlinlang.org/t/run-mingw-executable-with-wine-via-gradle/28145)

<div class="topic-metadata">

**Author:** [@paxbun](https://discuss.kotlinlang.org/u/paxbun)\
**Replies:** 4\
**Last updated:** [February 15, 2024, 1:53pm UTC](https://discuss.kotlinlang.org/t/run-mingw-executable-with-wine-via-gradle/28145 "2024-02-15T13:53:26Z")

</div>

I’m developing a Windows app with Kotlin/Native on macOS, and everything works well, including the linking process. However, my runDebugExecutableMingwX64 task doesn’t do anything, which I assume is running the resulting…

---

## [Kotlin native vs Rust](https://discuss.kotlinlang.org/t/kotlin-native-vs-rust/9785)

<div class="topic-metadata">

**Author:** [@hasan.oryx](https://discuss.kotlinlang.org/u/hasan.oryx)\
**Replies:** 69\
**Last updated:** [February 14, 2024, 7:08am UTC](https://discuss.kotlinlang.org/t/kotlin-native-vs-rust/9785 "2024-02-14T07:08:52Z")

</div>

Did any one tried both languages, if so, what are your observations/comments that can be used to define pros and cons for each one comparing with the other.

---

## [Kotlin/Native and backend](https://discuss.kotlinlang.org/t/kotlin-native-and-backend/27894)

<div class="topic-metadata">

**Author:** [@bahaabauomyus](https://discuss.kotlinlang.org/u/bahaabauomyus)\
**Replies:** 14\
**Last updated:** [February 12, 2024, 12:51pm UTC](https://discuss.kotlinlang.org/t/kotlin-native-and-backend/27894 "2024-02-12T12:51:03Z")

</div>

I hope I see Jetbrains pay more attention to Kotlin/Native, and try to make Kotlin more independent of Java and “stands on its own”. Most startups are turning to Go instead of Kotlin because of that, they do not want to…

---

## [Can I compile kotlin code to a static library for iOS](https://discuss.kotlinlang.org/t/can-i-compile-kotlin-code-to-a-static-library-for-ios/4113)

<div class="topic-metadata">

**Author:** [@zzmingo](https://discuss.kotlinlang.org/u/zzmingo)\
**Replies:** 4\
**Last updated:** [February 8, 2024, 7:17pm UTC](https://discuss.kotlinlang.org/t/can-i-compile-kotlin-code-to-a-static-library-for-ios/4113 "2024-02-08T19:17:54Z")

</div>

I want to write a library in kotlin using on both iOS/android platform，so far，on android, things be easy. I don’t have any idea on iOS, any one know it? Is there a way to calling kotlin from c/c++?

---

## [Kotlin Native library exported to .framework crashes on Xcode](https://discuss.kotlinlang.org/t/kotlin-native-library-exported-to-framework-crashes-on-xcode/27920)

<div class="topic-metadata">

**Author:** [@vegidio](https://discuss.kotlinlang.org/u/vegidio)\
**Replies:** 2\
**Last updated:** [January 28, 2024, 1:12pm UTC](https://discuss.kotlinlang.org/t/kotlin-native-library-exported-to-framework-crashes-on-xcode/27920 "2024-01-28T13:12:18Z")

</div>

I’m trying to implement a library using Kotlin Multiplatform to use in my iOS project so I download the official library template, which implements a Fibonacci sequence. I did only 2 changes in this project: I changed…

---

## [Kotlin/Native won't link a C library under Linux](https://discuss.kotlinlang.org/t/kotlin-native-wont-link-a-c-library-under-linux/28006)

<div class="topic-metadata">

**Author:** [@NorseDreki](https://discuss.kotlinlang.org/u/NorseDreki)\
**Replies:** 0\
**Last updated:** [January 23, 2024, 12:33pm UTC](https://discuss.kotlinlang.org/t/kotlin-native-wont-link-a-c-library-under-linux/28006 "2024-01-23T12:33:03Z")

</div>

Hey all, got this error when linking a C library to a Kotlin Native app: Task :linkDebugExecutableNativeLinuxX64 e: /home/runner/.konan/dependencies/x86\_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/x86\_64-unk…

---

## [Cannot implement UIPickerViewDelegateProtocol due to conflicting signatures](https://discuss.kotlinlang.org/t/cannot-implement-uipickerviewdelegateprotocol-due-to-conflicting-signatures/21694)

<div class="topic-metadata">

**Author:** [@dalewking](https://discuss.kotlinlang.org/u/dalewking)\
**Replies:** 7\
**Last updated:** [January 3, 2024, 11:05pm UTC](https://discuss.kotlinlang.org/t/cannot-implement-uipickerviewdelegateprotocol-due-to-conflicting-signatures/21694 "2024-01-03T23:05:06Z")

</div>

I am trying to implement UIPickerViewDelegateProtocol in Kotlin native. The problem is that UIPickerViewDelegateProtocol interface in Kotlin essentially has 3 method definitions that differ only in the return type and th…

---

## [Cross Platform Native Library with Shared Objects](https://discuss.kotlinlang.org/t/cross-platform-native-library-with-shared-objects/27877)

<div class="topic-metadata">

**Author:** [@danielku15.1](https://discuss.kotlinlang.org/u/danielku15.1)\
**Replies:** 1\
**Last updated:** [December 31, 2023, 2:10pm UTC](https://discuss.kotlinlang.org/t/cross-platform-native-library-with-shared-objects/27877 "2023-12-31T14:10:31Z")

</div>

Hey everyone Can anyone point me to some documentation or examples on how I can properly create a multiplatform library using Kotlin Multiplatform targeting multiple Native targets? I struggle a bit to make really a lib…

---

## [GUI for Kotlin|Native](https://discuss.kotlinlang.org/t/gui-for-kotlin-native/17598)

<div class="topic-metadata">

**Author:** [@ky8585](https://discuss.kotlinlang.org/u/ky8585)\
**Replies:** 9\
**Last updated:** [October 29, 2023, 4:10pm UTC](https://discuss.kotlinlang.org/t/gui-for-kotlin-native/17598 "2023-10-29T16:10:06Z")

</div>

Dear All, I assume that there is a shortage of GUI tools for Kotlin|Native. I’ve been advised that currently the only alternative is libui (GitHub - msink/kotlin-libui: Kotlin/Native interop to libui: a portable GUI li…

---

## [Kotlin Native and IntelliJ IDEA without extra build tools like Gradle/Maven?](https://discuss.kotlinlang.org/t/kotlin-native-and-intellij-idea-without-extra-build-tools-like-gradle-maven/27453)

<div class="topic-metadata">

**Author:** [@nguyen-sde](https://discuss.kotlinlang.org/u/nguyen-sde)\
**Replies:** 9\
**Last updated:** [October 8, 2023, 7:19am UTC](https://discuss.kotlinlang.org/t/kotlin-native-and-intellij-idea-without-extra-build-tools-like-gradle-maven/27453 "2023-10-08T07:19:00Z")

</div>

I want to create a tutorial repo using Kotlin Native and Go for students. The repo should be organized in multiple separate tiny modules. Each module has just 2 files: implementation file + test file. Any 2 modules sh…

---

## [USB events on Windows](https://discuss.kotlinlang.org/t/usb-events-on-windows/27346)

<div class="topic-metadata">

**Author:** [@Least\_popular](https://discuss.kotlinlang.org/u/Least_popular)\
**Replies:** 0\
**Last updated:** [September 5, 2023, 10:44pm UTC](https://discuss.kotlinlang.org/t/usb-events-on-windows/27346 "2023-09-05T22:44:58Z")

</div>

Hello there. I am a junior developer in Kotlin. I am playing around with Kotlin Native on Windows. I try to implement a simple cli app that displays a message when a usb stick is connected or removed. Following Windows A…

---

## [Idiomatic way to spawn subprocesses](https://discuss.kotlinlang.org/t/idiomatic-way-to-spawn-subprocesses/27222)

<div class="topic-metadata">

**Author:** [@NorseDreki](https://discuss.kotlinlang.org/u/NorseDreki)\
**Replies:** 0\
**Last updated:** [August 10, 2023, 9:36am UTC](https://discuss.kotlinlang.org/t/idiomatic-way-to-spawn-subprocesses/27222 "2023-08-10T09:36:52Z")

</div>

Would there be any idiomatic way to spawn subprocesses from Kotlin Native code? For example, Python has the subprocess package for that, and Rust has Command. Clues would be welcome. Thanks.

---

## [Need precompiled pkgs](https://discuss.kotlinlang.org/t/need-precompiled-pkgs/27048)

<div class="topic-metadata">

**Author:** [@r.neese](https://discuss.kotlinlang.org/u/r.neese)\
**Replies:** 0\
**Last updated:** [July 7, 2023, 2:42pm UTC](https://discuss.kotlinlang.org/t/need-precompiled-pkgs/27048 "2023-07-07T14:42:19Z")

</div>

we need pkgs for linux-aarch64 adn riscv64

---

## [Questions about Kotlin compilation](https://discuss.kotlinlang.org/t/questions-about-kotlin-compilation/25454)

<div class="topic-metadata">

**Author:** [@Zaftrox](https://discuss.kotlinlang.org/u/Zaftrox)\
**Replies:** 3\
**Last updated:** [June 26, 2023, 12:21am UTC](https://discuss.kotlinlang.org/t/questions-about-kotlin-compilation/25454 "2023-06-26T00:21:34Z")

</div>

Hey , am wondering how Kotlin project can be compiled for distribution, because i don’t understand how native compilation is done. So when do we can compile a project (or build it with Gradle or any other build tool) so…

---

## [How to determine linkerOpts at build-time?](https://discuss.kotlinlang.org/t/how-to-determine-linkeropts-at-build-time/17402)

<div class="topic-metadata">

**Author:** [@Loke](https://discuss.kotlinlang.org/u/Loke)\
**Replies:** 5\
**Last updated:** [June 23, 2023, 5:55pm UTC](https://discuss.kotlinlang.org/t/how-to-determine-linkeropts-at-build-time/17402 "2023-06-23T17:55:24Z")

</div>

I have a Kotlin multiplatform project where I link with ICU. To make that work, I have created the following .def file: headers = unicode/ustring.h unicode/utf8.h unicode/uchar.h unicode/ucnv.h unicode/ubrk.h headerFilt…

---

## [Building the different konan targets on GitHub Actions](https://discuss.kotlinlang.org/t/building-the-different-konan-targets-on-github-actions/26733)

<div class="topic-metadata">

**Author:** [@rhdunn](https://discuss.kotlinlang.org/u/rhdunn)\
**Replies:** 1\
**Last updated:** [May 13, 2023, 3:18am UTC](https://discuss.kotlinlang.org/t/building-the-different-konan-targets-on-github-actions/26733 "2023-05-13T03:18:03Z")

</div>

I’m working on a Kotlin multiplatform project (GitHub - rhdunn/xqt-kotlinx-json-rpc: Kotlin multiplatform JSON-RPC 2.0 library) and am trying to figure out how to get the different native konan targets building on GitHub…

---

## [How to use default system clang\\llvm for kotlin-native?](https://discuss.kotlinlang.org/t/how-to-use-default-system-clang-llvm-for-kotlin-native/8481)

<div class="topic-metadata">

**Author:** [@superriva](https://discuss.kotlinlang.org/u/superriva)\
**Replies:** 5\
**Last updated:** [April 13, 2023, 3:39pm UTC](https://discuss.kotlinlang.org/t/how-to-use-default-system-clang-llvm-for-kotlin-native/8481 "2023-04-13T15:39:19Z")

</div>

Hello. I’m trying to compile hello-world.kt with kotlin-native compiler. But it start to fetch its dependencies. Could I use default system clang\\llvm for it? My system (debian linux) has clang-6.0/llvm-6.0 installed. …

---

## [Cinterop can't find FILE type \[ERROR\]](https://discuss.kotlinlang.org/t/cinterop-cant-find-file-type-error/26660)

<div class="topic-metadata">

**Author:** [@bpavuk](https://discuss.kotlinlang.org/u/bpavuk)\
**Replies:** 0\
**Last updated:** [April 12, 2023, 9:20am UTC](https://discuss.kotlinlang.org/t/cinterop-cant-find-file-type-error/26660 "2023-04-12T09:20:40Z")

</div>

Hi there! I’m trying to build Kotlin/Multiplatform library, and I’m somewhat stuck with its Kotlin/Native implementation because of this error: Exception in thread "main" java.lang.Error: IdeaProjects\\multifile\\multifil…

---

## [Tracking object lifetimes in Kotlin Native](https://discuss.kotlinlang.org/t/tracking-object-lifetimes-in-kotlin-native/26309)

<div class="topic-metadata">

**Author:** [@Loke](https://discuss.kotlinlang.org/u/Loke)\
**Replies:** 1\
**Last updated:** [March 19, 2023, 4:48pm UTC](https://discuss.kotlinlang.org/t/tracking-object-lifetimes-in-kotlin-native/26309 "2023-03-19T16:48:53Z")

</div>

In my multiplatform project I need to work with bignums. In the JVM and JS targets, this is easy and I’ve created a wrapper around the built-in bignum functionality on those platforms. On Linux, I leverage the gmp libra…

---

## [Courutines cancellation exceptions](https://discuss.kotlinlang.org/t/courutines-cancellation-exceptions/26453)

<div class="topic-metadata">

**Author:** [@jQrgen](https://discuss.kotlinlang.org/u/jQrgen)\
**Replies:** 7\
**Last updated:** [March 9, 2023, 9:47pm UTC](https://discuss.kotlinlang.org/t/courutines-cancellation-exceptions/26453 "2023-03-09T21:47:00Z")

</div>

Hey For Kotlin Multiplatform projects: Is it possible to implement coroutines or threads for Kotlin/Native or Kotlin Coroutines that throw a cancellation exception? Quote from this blog post where the problem of “Shröd…

---

## [Kotlin, native target: assembly code?](https://discuss.kotlinlang.org/t/kotlin-native-target-assembly-code/26384)

<div class="topic-metadata">

**Author:** [@Redglyph](https://discuss.kotlinlang.org/u/Redglyph)\
**Replies:** 1\
**Last updated:** [March 2, 2023, 7:01pm UTC](https://discuss.kotlinlang.org/t/kotlin-native-target-assembly-code/26384 "2023-03-02T19:01:08Z")

</div>

Hi, Is there a way to get the assembly code out of the backend phase in LLVM, when building to a native target? I’m interested to see the result code with different alternatives in Kotlin, preferrably for x86-64 and if …

---

## [Kotlin-native without XCode?](https://discuss.kotlinlang.org/t/kotlin-native-without-xcode/19312)

<div class="topic-metadata">

**Author:** [@realdoug](https://discuss.kotlinlang.org/u/realdoug)\
**Replies:** 7\
**Last updated:** [February 27, 2023, 4:09pm UTC](https://discuss.kotlinlang.org/t/kotlin-native-without-xcode/19312 "2023-02-27T16:09:48Z")

</div>

Is it possible to use Kotlin-Native on MacOS with just the command line tools and not XCode itself installed? I compiled the example program with the latest release but get the following error: xcrun: error: unable to …

---

## [How should AndroidNative be used in the Kotlin Multiplatform?](https://discuss.kotlinlang.org/t/how-should-androidnative-be-used-in-the-kotlin-multiplatform/26358)

<div class="topic-metadata">

**Author:** [@DongXinyu](https://discuss.kotlinlang.org/u/DongXinyu)\
**Replies:** 0\
**Last updated:** [February 8, 2023, 5:44pm UTC](https://discuss.kotlinlang.org/t/how-should-androidnative-be-used-in-the-kotlin-multiplatform/26358 "2023-02-08T17:44:05Z")

</div>

When setting target to AndroidNativeArm64 in gradle: androidNativeArm64 { binaries { sharedLib() } } My understanding is that Kotlin Multiplatform can replace C/C++ to complete the w…

---

## [Do anyone successfully change LLVM to local LLVM?](https://discuss.kotlinlang.org/t/do-anyone-successfully-change-llvm-to-local-llvm/26286)

<div class="topic-metadata">

**Author:** [@Nambers](https://discuss.kotlinlang.org/u/Nambers)\
**Replies:** 0\
**Last updated:** [January 26, 2023, 11:34pm UTC](https://discuss.kotlinlang.org/t/do-anyone-successfully-change-llvm-to-local-llvm/26286 "2023-01-26T23:34:31Z")

</div>

Hi, according to hacking.md and if I understand correctly, developers are able to change LLVM used by k/n to there local LLVM by using -Xllvm-variant. However, I am fail to do that, more detail in this issue: https://yo…

---

## [Multiplatform configuration for windows and linux sharing same cinterop definitions](https://discuss.kotlinlang.org/t/multiplatform-configuration-for-windows-and-linux-sharing-same-cinterop-definitions/15667)

<div class="topic-metadata">

**Author:** [@kubapet](https://discuss.kotlinlang.org/u/kubapet)\
**Replies:** 3\
**Last updated:** [January 12, 2023, 7:34am UTC](https://discuss.kotlinlang.org/t/multiplatform-configuration-for-windows-and-linux-sharing-same-cinterop-definitions/15667 "2023-01-12T07:34:25Z")

</div>

Hello, I would like to ask what is the preffered way for defining two targets (linuxX64 and mingwX64) with a shared sourceSet with an cinterop definition. The problem is that when I define the cinterops separately for e…

---

## [C interoperability: CPointer of a stack variable](https://discuss.kotlinlang.org/t/c-interoperability-cpointer-of-a-stack-variable/26190)

<div class="topic-metadata">

**Author:** [@antekone](https://discuss.kotlinlang.org/u/antekone)\
**Replies:** 0\
**Last updated:** [January 10, 2023, 7:33am UTC](https://discuss.kotlinlang.org/t/c-interoperability-cpointer-of-a-stack-variable/26190 "2023-01-10T07:33:52Z")

</div>

I’m trying to write a JNI implementation of some function that is called from JVM. That function at some point needs to convert a JVM String to a Kotlin String. This means that I have to call the GetStringUTFChars functi…

---

## [Why is Kotlin Native much slower than JVM?](https://discuss.kotlinlang.org/t/why-is-kotlin-native-much-slower-than-jvm/10226)

<div class="topic-metadata">

**Author:** [@tommot1985](https://discuss.kotlinlang.org/u/tommot1985)\
**Replies:** 27\
**Last updated:** [January 1, 2023, 2:58pm UTC](https://discuss.kotlinlang.org/t/why-is-kotlin-native-much-slower-than-jvm/10226 "2023-01-01T14:58:13Z")

</div>

Hi there, i have created a simple program to generate pairs of twin primes (that means that the second prime is the first prime + 2, eg. 3 and 5 or 5 and 7. class Primes : Sequence\<Long\> { var next: Sequence\<Long\> = …

---

## [Questions about Kotlin Native](https://discuss.kotlinlang.org/t/questions-about-kotlin-native/26042)

<div class="topic-metadata">

**Author:** [@dcs.79c](https://discuss.kotlinlang.org/u/dcs.79c)\
**Replies:** 13\
**Last updated:** [December 19, 2022, 6:01pm UTC](https://discuss.kotlinlang.org/t/questions-about-kotlin-native/26042 "2022-12-19T18:01:21Z")

</div>

I read online about Kotlin Native. Intriguing! It doesn’t require the Java Runtime Environment! I read online that Kotlin Native can be compiled to Android & iOS apps. I also found out that one can create Mac, Windows &…

[Previous page](https://discuss.kotlinlang.org/c/native/15.md)

[Next page](https://discuss.kotlinlang.org/c/native/15.md?page=2)
