Closed Ic-ks closed 11 months ago
Yeah, I think it's time. I don't know off hand, does console work the same in WASM?
I also hoped that it comes with the same console, but it didn't. I think the background is that a wasm can be executed outside of a browser. I could workaround it by declaring the console again. I forked the project, here are the changes I did to support at least wasm { browser() }
. If you want, I can create a pull request?
I think for wasms which are not executed in a browser, there are still some things to do. I discovered following maybe related code in the generated example.uninstantiated.mjs
of my wasm example project:
if (isBrowser) {
console.error(text, ...styles);
} else {
const t = "\n" + text;
if (typeof console !== "undefined" && console.log !== void 0)
console.log(t);
else
print(t);
}
Nevertheless wasm is still experimental so I think in the future they will provide a proper logging interface and logic to differ between a browser wasm and any other wasm is forgiven effort.
any idea on a new release date supporting wasm ?
@kpgalligan So does it support wasm now or its still in planning phase? Or If its in progress, any idea when release will be availabe with wasm support?
it does, yes.
thanx @HoffiMuc
Hi, Jetbrains started to provide library versions of ktor, kotlinx.serialization and some other libraries for the already available wasm target:
It would be nice if kermit could support the wasm target, too.
BTW thanks for this library. Great work!