Any idea why kotlinx-browser is available for wasm...
# javascript
n
Any idea why kotlinx-browser is available for wasm js but not for js ir?
Apparently this PR (https://github.com/Kotlin/kotlinx-browser/pull/15) is related to adding JS target to the library. But seems it’s a bit abandoned
r
I believe it's because everything in there is included with the stdlib in js but not in wasmJs
m
https://youtrack.jetbrains.com/issue/KT-75480 The last entry also mentions kotlinx.browser.
t
This week we released Kotlin Wrappers
2025.7.3
All browser API (
kotlin-js
,
kotlin-web
,
kotlin-browser
) we compile from common sources.
Common (for JS and WasmJS) browser declarations you can find here. We generate 100% of stable browser API + suspend adapters for Promise API.
n
Oh I didn’t know there were also available in kotlin wrappers (like why kotlinx-browser repo exists then 🤷‍♂️ ). Thank you!
e
> like why kotlinx-browser repo exists That repo will contain what is now in the stdlib. Major reason is not depending on Kotlin releases to deliver updated externals.
n
I understand. But if I’m right, kotlinx-browser is a duplicate of kotlin-wrappers/kotlin-browser?
e
No. kotlin-wrappers is an opinionated set of libraries that go beyond simple externals.
t
kotlinx-browser
describe only part of stable Browser API (~40-50%) Updates are rare. Mostly no breaking changes
kotlin-browser
describe 100% of stable Browser API Updates are regular. Breaking changes are regular (they are required to describe new browser contracts) In common case formula is simple: No updates = no breaking changes
like why kotlinx-browser repo exists then
It’s required for libraries, which are ready to use limited subset of Browser API, but have high requirements for backward compatibility
👍 1