Hey Kotlin+WASM experts,
I want to compile a Kotlin library which will use SQLite to store and retrieve data. I want compilation target to be WASM. SQLite binaries are available as wasm files, how do I add that to my project? This library will be called from JS in browser.
Any pointers on how do I process are much appreciated.
t
Thomas Nattestad
07/17/2023, 9:14 AM
IIUC you're looking to compile a Kotlin library which has a Kotlin API for access SQLite (in C++ implementation). Is the SQLite source already compiled or do you need to compile that to wasm as well?
Hey @Thomas Nattestad thanks for the reply.
I am using SQLite+OPFS in JS/TS already. But I was wondering how do I add that as a dependency so that SQLite api is accessible in Kotlin code.
Copy code
val wasmMain by getting {
dependsOn(commonMain)
dependencies {
implementation("<what goes here>")
}
}
I want to bundle the resulting code again as wasm and ship it to browser to be consumed by JS.