-
Notifications
You must be signed in to change notification settings - Fork 566
-flavor jvm or cinterop for jvm? #2252
Comments
|
This sounds like there is something in place already but not publicly available yet, is it right @olonho ? |
Sure, Kotlin/Native compiler is written on Kotlin/JVM using JVM version of interop to call into LLVM. |
I would like to work on this as I would really wish to not have to rely on JNA anymore, which is really a pain to work with. NotesHere are some notes on my understanding on how the interop stub generator is used:
StrategyI believe that the 'c' in "cinterop" refers to the thing being interoperated with and not the where it is interoperated from. So adding an additional tool name "jvminterop" in Here is what I think I have to do:
Please tell me if that makes sense at all. Questions
In advance, thanks for your help! |
@olonho, could you provide me some guidance or point me to someone who can ? |
Hello, @ptitjes! The problem with work on two projects is difficult to be managed. About the approach that you describe in the Strategy section - it seems consistent enough comparing with the existing interop. But I'm afraid that no concrete advice can be given here, as far as there is no planned design for this feature currently. |
I was hoping to avoid JNA or JNI by having Kotlin/Native automatically generate cinterop bindings that can be used with a |
According to migrating issue tracking to YouTrack, closing this issue in favour of https://youtrack.jetbrains.com/issue/KT-39144 |
I'm working on a project which is heavily dependent on C libraries. In order to avoid Android NDK, we are using go mobile to build an android
aar
from c dependencies which make s life much easier, however, there are some limitations here as well like you cannot have 2 go-mobile packages in the same app.We tried Kotlin native with cinterop which looks awesome, however, atm it looks like it is not possible to compile c code for JVM.
Doing a bit of research we come to
cinterop -flavor jvm
which looks like an internal flag that is not documented anywhere.Question:
The text was updated successfully, but these errors were encountered: