~/talk

Integrating Kotlin/JS in a Kotlin Multiplatform library

Talkat droidcon New York 2022 · 2022-09-01..09-02· [kotlin, javascript]
links:none on file
slides:none on file

Kotlin/JS compiles Kotlin to JS via the Gradle plugin with built‑in NPM, yarn and webpack support; use IR compiler and choose browser vs node and binaries:library vs executable. Existing KMM code needs a mobileMain to avoid massive refactors; expect/actual plus JS export annotations expose APIs, but suspended functions don’t export (use Promise conversion) and collections often require arrays. Dukat generates external declarations for NPM modules; watch bundle sizes (examples: kotlinx-datetime ~200 KB, serialization ~300 KB, Ktor ~862 KB, combined 1.3 MB before improvements; 1.7.10 cuts sizes ~40% in tests).

AI-written summary · about

  1. 0:00Introduction
  2. 1:58What is Kotlin JS
  3. 3:24Setting up Kotlin JS
  4. 5:31Refactoring for JS compatibility
  5. 7:59JS build options
  6. 14:29Exporting Kotlin to JS
  7. 17:38Challenges and limitations
  8. 21:46Third-party dependencies
  9. 26:21Multiplatform libraries
  10. 28:49Bundle size impact
  11. 31:19Architecture adjustments
  12. 32:44Production use and buzz
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.