Kotlin code to standalone wasm without imports

I want to write kotlin code without any UI library and frameworks and want to compile into standalone wasm (without wasi) module without any unnecessary imports like js_code. How can I achieve that ? I am new to the language and have been stuck on this for a while. My aim is to use kotlin for it’s language features and nothing related to UI or any APIs related to that.

I haven’t used the Kotlin multiplatform stuff, but I assume you would just create a Kotlin project, using Gradle, add the Kotlin plugin, add the multiplatform plugin, set your compile target as WASM, and then go for it.

1 Like

yeah managed to achieve that using the template: GitHub - Kotlin/kotlin-wasm-wasi-template: A template repository for Kotlin/Wasm with WASI. Thanks @Skater901 for the answer

1 Like