With Chasms <latest release> you can now generate ...
# feed
c
With Chasms latest release you can now generate a typesafe kotlin interface to interact with your WebAssembly across JVM, Native and JS! Chasms Gradle plugin leverages the virtual machine embedded in the browser when targeting JS targets whilst continuing to use Chasms own virtual machine everywhere else. It does this whilst hiding all the implementation details and providing a typesafe Kotlin interface for you to program against. Checkout the example repo for more information!
🚀 4
m
Wouldn’t the same also apply to the wasmJs target and not only JS? You could cover both worlds via the new common webMain source folder and appropriate configuration in the build script.
c
Currently this is blocked on a library I use for loading test resources, when I get time I'll contribute to that and then it should be as simple as adding the target. The generic vm already has an impl that should work on targets that can call the js apis
m
Oh dear, I had some trouble with that library myself 😢. https://github.com/goncalossilva/kotlinx-resources/issues/141