KoWasm explores fullstack development with Kotlin and WebAssembly. It leverages Kotlin/Wasm, WASI and WebAssembly Component Model.
This project is developed on Sébastien Deleuze's spare time in collaboration with the Kotlin/Wasm team, taking inspiration from Slava Kuzmich initial prototype with the goal that, at some point, WASI and WebAssembly Component model support would be provided out of the box by Kotlin/Wasm, see KT-36172 and KT-56605 related issues.
This project and Kotlin/Wasm in general are in very early stage of development:
- It leverages Kotlin 1.9 APIs and Node experimental WASI API.
- Artifacts are not published to any repository yet.
- Pure WASI runtimes like Wasmtime or WasmEdge do not support Wasm garbage collection yet, so it is required to use V8-based WASI runtime like Node.
IntelliJ IDEA 2023.1+ should be used to get Kotlin/Wasm autocompletion.
Node 22+ should be able to run the project. You can install it using nvm:
nvm use 22.3.0
npm install --global mocha
Use the various .sh
script to build and test the project. Most of the features can be found in the samples
directory.
Artifacts are not yet published to any repository, so you need to build them locally. For example:
./gradlew wasi:publishToMavenLocal