Skip to content

Commit 23c5271

Browse files
committed
build: support wasmJs and wasmWasi
1 parent 5de45d2 commit 23c5271

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Please refer to the original guides for more information.
2121
Currently, artifacts for the following platforms are supported:
2222
* JVM
2323
* JS (both browser and Node.js)
24+
* WebAssembly (JS and WASI)
2425
* LinuxX64
2526
* MingwX64
2627
* MacosX64

build.gradle.kts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import io.gitlab.arturbosch.detekt.Detekt
66
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
77
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
88
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
9+
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
910

1011
plugins {
1112
kotlin("multiplatform")
@@ -51,6 +52,21 @@ kotlin {
5152
nodejs()
5253
}
5354

55+
@OptIn(ExperimentalWasmDsl::class)
56+
wasmJs {
57+
browser()
58+
nodejs()
59+
applyBinaryen()
60+
}
61+
62+
@OptIn(ExperimentalWasmDsl::class)
63+
wasmWasi {
64+
nodejs()
65+
66+
// Available since 2.0
67+
// applyBinaryen()
68+
}
69+
5470
linuxX64()
5571
mingwX64()
5672
macosX64()

0 commit comments

Comments
 (0)