WASI-Emscripten-Host
This Kotlin Multiplatform library provides an implementation of the of the host functions specified in WASI Preview 1, as well as an experimental implementation of the Emscripten JS environment host functions. It is designed to work with JVM/Multiplatform WebAssembly runtimes such as GraalWASM, Chicory, and Chasm.
The primary goal is to run WebAssembly binaries compiled for WASM WASI or for Emscripten in a JVM environment, without the need for a browser or JavaScript.
The library currently implements all non-deprecated functions of the WASI Preview 1 specification and mostly passes the WASI Testsuite. For more details, refer to the the WASI Preview 1 Implementation.
A limited set of Emscripten environment is also implemented, sufficient to run a single-threaded version of SQLite compiled with Emscripten. The description of the Emscripten implementation and an example of compiling a C++ application to work with this library can be found on the Emscripten environment.
Supported Kotlin targets: JVM, macosArm64, macosX64_, iosArm64, iosX64, iosSimulatorArm64, linuxX64, linuxArm64, mingwX64.
Usage
Refer to the sections on integration with runtimes:
Releases
The latest release is available on Maven Central.
repositories {
mavenCentral()
}