oleksandr.karpovich
7 months ago
10 changed files with 83 additions and 6 deletions
@ -1,16 +1,12 @@
|
||||
compose.version=1.4.1 |
||||
kotlin.version=1.8.20 |
||||
compose.version=1.5.10-dev-wasm01 |
||||
kotlin.version=1.9.20-RC |
||||
agp.version=7.0.4 |
||||
org.gradle.jvmargs=-Xmx3g |
||||
kotlin.code.style=official |
||||
kotlin.native.useEmbeddableCompilerJar=true |
||||
kotlin.native.enableDependencyPropagation=false |
||||
kotlin.mpp.enableGranularSourceSetsMetadata=true |
||||
# Enable kotlin/native experimental memory model |
||||
kotlin.native.binary.memoryModel=experimental |
||||
compose.desktop.verbose=true |
||||
android.useAndroidX=true |
||||
kotlin.js.webpack.major.version=4 |
||||
org.jetbrains.compose.experimental.jscanvas.enabled=true |
||||
org.jetbrains.compose.experimental.macos.enabled=true |
||||
org.jetbrains.compose.experimental.uikit.enabled=true |
||||
|
@ -0,0 +1,7 @@
|
||||
import org.jetbrains.skiko.wasm.onWasmReady |
||||
|
||||
fun main() { |
||||
onWasmReady { |
||||
runBenchmarks() |
||||
} |
||||
} |
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Benchmark</title> |
||||
<script src="skiko.js"></script> |
||||
</head> |
||||
<body> |
||||
It takes ~ 1 minute here and blocks the UI. See the console for results (open it before starting the page). |
||||
<script src="compose-benchmarks.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,6 @@
|
||||
|
||||
fun main() { |
||||
println("Started...") |
||||
runBenchmarks() |
||||
println("Completed!") |
||||
} |
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Benchmark K/Wasm</title> |
||||
<script src="skiko.js"></script> |
||||
<script src="compose-benchmarks.js"></script> |
||||
</head> |
||||
<body> |
||||
See the console output... |
||||
</body> |
||||
</html> |
@ -0,0 +1,4 @@
|
||||
import { instantiate } from './compose-benchmarks-wasm-js.uninstantiated.mjs'; |
||||
|
||||
await wasmSetup; |
||||
await instantiate({ skia: Module['asm'] }); |
@ -0,0 +1,18 @@
|
||||
config.entry = { |
||||
main: [require('path').resolve(__dirname, "kotlin/load.mjs")] |
||||
}; |
||||
|
||||
class IgnoreImportErrorsPlugin { |
||||
apply(compiler) { |
||||
compiler.hooks.done.tap('IgnoreImportErrorsPlugin', (stats) => { |
||||
stats.compilation.errors = stats.compilation.errors.filter((error) => { |
||||
if (error.message.includes("skia")) { |
||||
return false; // Remove the error
|
||||
} |
||||
return true; // Keep the error
|
||||
}); |
||||
}); |
||||
} |
||||
} |
||||
|
||||
config.plugins.push(new IgnoreImportErrorsPlugin()); |
Loading…
Reference in new issue