hey, I was wondering if there is a way to load a k...
# kotlin-native
s
hey, I was wondering if there is a way to load a kotlin native library as a dynamic lib? or do I have to generate a dynamic C lib and load that? I basically just want to load & use a lib at runtime
o
yes, it is possible with
-produce dynamic
compiler option
s
Does this generate a dynamic klib or is it a workaround using C?
o
klib is compile-time artifact, for runtime ones you need to produce native binary, such as dylib on a macOS. Interface of such lib is expressed in C language
s
Ok, thank you!