https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
e

Elyes Ben Salah

12/10/2020, 4:19 PM
Hi guys , I would like to know how to import and use a KLib
k

Kris Wong

12/10/2020, 4:30 PM
context? kilb is internal. it's generally not something you need to worry about outside of publishing if you intend for it to be consumed by another KMP module.
e

Elyes Ben Salah

12/10/2020, 4:35 PM
I’m trying to import datkt.sodium in my kotlin library which is a KLib (sodium.klib) so I’m trying to figure out away to use it
I did install it with klib install
k

Kris Wong

12/10/2020, 4:51 PM
is it not published to maven like any other Kotlin artifact?
e

Elyes Ben Salah

12/10/2020, 4:53 PM
I don’t really know , there is no much information in the repo : https://github.com/datkt/sodium , with NPM the only source
and what am thinking by using it I can solve the dependencies in iOS and Java at the same time cause it is a binding for the Native library , am I wrong ?
k

Kris Wong

12/10/2020, 6:00 PM
well, kotlin/native and kotlin/jvm are independent things. for java <-> native integration you need JNI
e

Elyes Ben Salah

12/10/2020, 8:24 PM
okay so I guess I got it wrong 😕 my though was I will create one library for both , thank bro 🙏
3 Views