Federico Tomassetti
12/23/2023, 7:11 PMStefan Oltmann
12/23/2023, 7:31 PMSvyatoslav Kuzmich [JB]
12/23/2023, 7:36 PMcompileProductionExecutableKotlinWasmWasi
and see the output in build
(Gradle plugin support for WASI is a bit rough, and there could be a better way that I don’t know of)
build
└── compileSync
└── wasmWasi
└── main
└── productionExecutable
└── kotlin
├── kotlin-wasm-wasi-example-wasm-wasi.map
├── kotlin-wasm-wasi-example-wasm-wasi.mjs
└── kotlin-wasm-wasi-example-wasm-wasi.wasm
The kotlin-wasm-wasi-example-wasm-wasi.wasm
is the file you are looking for. You can, in theory, use it independently with any wasm runtime that supports recent additions like WasmGC. In practice, these runtimes are V8 and SpiderMonkey, and your python embedding probably wouldn’t support it yet.Svyatoslav Kuzmich [JB]
12/23/2023, 7:58 PM.wasm
format, you can only @WasmExport
functions with numbers, making your library API very low-level. Upcoming Component Model spec promises to enable rich types in many languages, like python.