I have a library that wraps a native library. I ha...
# webassembly
k
I have a library that wraps a native library. I have recently added support for wasmJs successfully following a similar approach with skiko and WasmImport usage. However, the js wrappers that are needed to work don't seem to be included in a way that is "friendly" for consumers of the library. I've needed to copy files around when trying to consume the library as a package for it to load the js files successfully. Is this an expected limitation currently? Or am I missing something?
Copy code
val wasmJsMain by getting {
    dependsOn(commonMain)
    resources.srcDirs("src/wasmJsMain/resources")
}
Is how I'm including the resources, and they do get packed into the published artifacts.
This is the project I was referring to. My goal is to be able to publish a maven package for the wasmJs target that is consumption friendly, i.e. nothing is necessary for the end user to use it. However, the project's resources never are brought automatically with the consuming application. https://github.com/crowded-libs/kotlin-lmdb