hey folks :wave: is there already any effort to cr...
# webassembly
c
hey folks 👋 is there already any effort to create: • a emscripten generated .wasm module + webidl ◦ generate a common kotlin code either expect/actual or kotlin code from the AST ◦ generate either a JAR (wasm IR -> jvm bytecode) or load the wasm at runtime and use the expect interface to access the code ◦ generate K/JS code that loads the webassembly module and calls the methods as required ◦ generate K/N code that for example uses wasm2c to generate an amalgamation C that can be used in .def in K/N so it compiles to all the K/N targets
a
there’s this repo, which doesn’t use the approach you describe but follows a similar vein https://github.com/whyoleg/ffi-kotlin
c
that could be an starting option, I'll try. I would definitely prefer not to have to provide binaries JVM/Android binaries for all the arm, mips, x64, etc. to it would work on any machine. But first let's see how it works. I used to remember there was something to convert wasm into jvm bytecode somewhere. Maybe it could be possible to also join that effort
and I tried wasm2c and seemed to work, so might be possible to be usable on a K/N .def file in an automated way
Just remembered that I started this 5 years ago: https://github.com/korlibs/wasm2kt I will also investigate the status of that
b
c
Thats the other one that I remembered, thanks! Maybe it can be used as base too