When we build binaries with Kotlin Native there se...
# kotlin-native
n
When we build binaries with Kotlin Native there seems to be a small overhead in size due to the K/N "runtime". If the binary is a shared library and you have many of these, this overhead is multiplied. Is there a way to build shared libs linked against a shared libkotlinnative, for example? This way we could add a single libkotlinnative to the project. Kind of like in Android NDK you can choose to build with libc++_shared.so or libc++_static.so, each one being better than the other for some use cases. https://developer.android.com/ndk/guides/cpp-support
k
I’m not sure, but I think the compiler only includes the parts of the KN runtime that you actually use, so the full KN runtime would itself be significantly larger than the portion included in each individual binary. However, of course, if you have a lot of them, a single runtime might make more sense. I’ve been thinking about this in the ios and framework context, as the likely reason why having multiple frameworks is complicated.
n
Yes - it would be nice to be able to evaluate this ourselves based on our setup though. Do you think it makes sense to open a feature request? What is the correct place to do so?