korge icon indicating copy to clipboard operation
korge copied to clipboard

Kotlin -> WASM -> C++

Open soywiz opened this issue 2 years ago • 1 comments
trafficstars

We want to generate C++ code that we can use to compile to unsupported platforms like Playstation, Xbox or homebrew platforms.

We can benefit from Kotlin targetting WASM.

It should be possible to start doing stuff by using WasmImport:

https://youtrack.jetbrains.com/issue/KT-55589/Basic-support-of-WASI

We can try to use wasm2c:

https://github.com/WebAssembly/wabt/blob/main/wasm2c/README.md

Alternatively we can continue work here:

https://github.com/korlibs/wasm2kt/

And benefit from having the AST to do something personalized to our specific use-case. Eventually though using a standard wasm2c would benefit the whole community. So might be worth try to contribute there.

soywiz avatar Jun 14 '23 01:06 soywiz