theapache64 / rebugger

A simple Compose Multiplatform library designed to print the reason for recomposition in your console/Logcat window."
Apache License 2.0
925 stars 7 forks source link

WASM support #12

Open CXwudi opened 1 month ago

CXwudi commented 1 month ago

Thanks for maintaining this useful debugging utility. I was transferring from JS to WASM and I got:

Could not resolve io.github.theapache64:rebugger:1.0.0-rc03.

I figured that WASM platform is not yet supported from the build file, despite #2 mentioned WASM.

So I am wondering any chance to add WASM support? 👀

theapache64 commented 1 month ago

Hi @CXwudi

thanks for the kind words :)

I tested it in my sample wasm project, and it works 🤔 (you can try checkout to rebugger-sample branch and see if it works for you pls). also if you could share a small repro I can try setup rebugger in it?

CXwudi commented 1 month ago

Hi @theapache64,

Thanks for the prompt reply and the example. However, the platform you provided is a JS platform despite using onWasmReady. When I refer to Wasm platform, I am referring to:

kotlin {
  wasmJs {
    browser {
    }
  }
  sourceSets {
    wasmJsMain.dependencies {
      implementation("io.github.theapache64:rebugger:1.0.0-rc03")
    }
  }
}

setup as mentioned in https://github.com/Kotlin/kotlin-wasm-browser-template/blob/main/build.gradle.kts