https://kotlinlang.org logo
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
webassembly
  • m

    Matt Nelson

    01/31/2023, 8:18 PM
    Heyo! Anyone in here able to advise on how I might go about adding
    wasm32
    support for a library of mine; secure-random? It's the only platform not supported currently and I've no clue where to start 😢 Issue Ticket
    b
    e
    s
    • 4
    • 7
  • b

    bashor

    02/01/2023, 4:53 PM
    Teaser (reminder) of this week https://twitter.com/bashorov/status/1620827351356674048
  • b

    bashor

    02/06/2023, 11:02 PM
    The teaser of the week will come soon, and now you can try to guess what it is about. https://twitter.com/bashorov/status/1622730172548935680
  • p

    Pablichjenkov

    02/06/2023, 11:13 PM
    It gotta be
    Composy
  • b

    bashor

    02/08/2023, 2:50 PM
    It’s not actually a teaser teasered before 🌚, but anyway, Good News: https://twitter.com/bashorov/status/1623331214638690304
    s
    • 2
    • 3
  • j

    James Ward

    02/10/2023, 3:26 AM
    Hi all! I've been playing with the new Kotlin/Wasm stuff. Very exciting 🙂 One question... It seems the gc Chrome flag (chrome://flags/#enable-webassembly-garbage-collection) isn't in 109 but in 110. But maybe I'm doing something wrong. Anyone know?
    j
    s
    b
    • 4
    • 4
  • j

    James Ward

    02/10/2023, 4:35 AM
    Is it a filed/known issue that
    wasmBrowserRun
    hard codes a default browser exec of
    google-chrome-canary
    ?
    s
    b
    • 3
    • 4
  • s

    sdeleuze

    02/10/2023, 5:24 AM
    Is there any chance we could avoid to have
    kotlin-js-store/yarn.lock
    generated when not using JS dependencies in our Kotlin/Wasm projects? I guess I am not the only one using Kotlin/Wasm to avoid dealing with the crazy JS ecosystem so getting that thing generated (and expected ti be committed for apps I think) by default is a bit irritating.
    h
    s
    +2
    • 5
    • 8
  • k

    Krystian

    02/10/2023, 4:35 PM
    So from my understanding the new WASM backend is no longer using LLVM… If not, then what is it using? How is Kotlin creating wasm file?
    h
    s
    +2
    • 5
    • 10
  • d

    Daniel Perez

    02/11/2023, 8:17 PM
    Has anyone had any success getting Kotlin/Wasm to run on the Wasmer runtime? If you have I would love to know
    s
    • 2
    • 2
  • s

    sdeleuze

    02/12/2023, 8:40 AM
    @David Herman Do you have any plan to support Kotlin/Wasm in https://github.com/varabyte/kobweb?
    d
    • 2
    • 1
  • f

    FunkyMuse

    02/13/2023, 6:59 AM
    Hey guys, did anyone manage to incorporate lazycolumn or column to be scrollable vertically? For me it doesn't seem to work even using vertical scroll modifier for column
    s
    b
    o
    • 4
    • 5
  • s

    sdeleuze

    02/13/2023, 8:16 PM
    https://kotlinlang.slack.com/archives/C0BJ0GTE2/p1676319398637289
    m
    b
    • 3
    • 3
  • b

    bashor

    02/14/2023, 9:42 AM
    The teaser of the week! 😉 https://twitter.com/bashorov/status/1625437131706363904
    j
    d
    +2
    • 5
    • 8
  • m

    mcpiroman

    02/15/2023, 4:50 PM
    Is there some highlight of what is or isn't currently supported by WASM backend? IIRC things like try-cache were not on the first public showcase? But if it can run Compose I guess it's pretty complete right now.
    s
    • 2
    • 1
  • b

    bashor

    02/15/2023, 8:44 PM
    One more teaser for this week (live demo) https://twitter.com/bashorov/status/1625958156189794313 Enjoy!
    a
    • 2
    • 9
  • p

    Pablichjenkov

    02/15/2023, 10:14 PM
    I tried on chrome-dev Android version 112. Works but the touch events are really slow/laggy. Animation works laggy too. Firefox on Android nightly 112, didn't work
    b
    • 2
    • 5
  • a

    andylamax

    02/16/2023, 8:20 AM
    I have the following setup in
    build.gradle.kts
    wasm {
            browser()
            binaries.executable()
        }
    with a single
    index.kt
    fun main() {
      println("works")
    }
    when I run
    ./gradlew wasmBrowserDevelopmentRun
    , it fails with
    Module build failed: UnhandledSchemeError: Reading from "node:module" is not handled by plugins (Unhandled scheme).
    Webpack supports "data:" and "file:" URIs by default.
    You may need an additional plugin to handle "node:" URIs.
    Full error log is in thread. But how do I successfully run this test app??
    i
    • 2
    • 2
  • k

    K J

    02/16/2023, 6:36 PM
    Just saw that Kotlin/WASM is now a big thing. I spent most of last night porting my JVM project to WASM so that I could visualize the data I've been working with! I made a color LUT generator - this is a visualizer for what the raw output of the generated LUT looks like, before we start patching it up :)
    2023-02-16 12-33-37-1.mp4
    s
    • 2
    • 1
  • s

    sdeleuze

    02/18/2023, 7:14 AM
    FYI Go is going to support WASI out of the box. https://github.com/golang/go/issues/58141
  • a

    Alexander Girke

    02/19/2023, 9:33 AM
    Hi there, is there an example on how to create a WASM library that can be used from Node.js? Just starting to get an idea of what is possible with WASM… Like, would using WASM make sense if I want to do computation-heavy things on Node? Probably that would require the use of Node workers, wouldn’t it?
    k
    • 2
    • 3
  • b

    bashor

    02/22/2023, 10:15 PM
    No teasers this week, but I have a question for you: https://mobile.twitter.com/bashorov/status/1628516357686849538
    d
    p
    +3
    • 6
    • 12
  • a

    Alexander Girke

    02/24/2023, 8:14 AM
    Hey, I tried to run https://github.com/linux-china/kotlin-wasm-node-demo after changing the version to
    1.8.20-Beta
    , but was not able to. Basically, the command
    ~/.gradle/nodejs/node-v19.6.0-darwin-x64/bin/node --experimental-wasm-gc ~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs
    failed with the following error message:
    file://~/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140
            const wasmModule = new WebAssembly.Module(wasmBuffer);
                               ^
    
    CompileError: WebAssembly.Module(): Compiling function #16:"kotlin.collections.IteratorImpl.hasNext" failed: i32.trunc_f64_s[0] expected type f64, found call_ref of type i32 @+14179
        at instantiate (file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.uninstantiated.mjs:140:28)
        at async file://~/kotlin-wasm-node-demo/build/js/packages/kotlin-wasm-node-example-wasm/kotlin/kotlin-wasm-node-example-wasm.mjs:3:17
    Is this a known issue?
    s
    • 2
    • 3
  • a

    Alexander Girke

    02/24/2023, 8:38 AM
    Just another question: what do I have to do in order to add a function or a value to the WASM exports? I inspected the .wat file and the only exports I could find were “__init” and “memory” .
    s
    • 2
    • 2
  • a

    Alexander Girke

    02/25/2023, 7:41 AM
    Sorry for spamming this channel, but could you please provide more information on whether Long & ULong are already compiled correctly? I tried to add a parameter with such type to an exported function, but this leads to the following: • JS-related warning is emitted:
    Exported declaration uses non-exportable parameter type: ULong
    -> seems to be ignorable • .wat file no longer exists • WASM Instance can be instantiated in nodeJs & function called for Long -> for ULong, WASM Instance can not be instantiated due to
    Compiling function #656:"fibonacci__JsExportAdapter" failed: type error in branch[0] (expected structref, got i64) @+55427
    (function signature looks like
    fun fibonacci(n: ULong, a: ULong, b: ULong): ULong
    ) Also, if I try to add a default value for the parameters
    a
    &
    b
    in the ULong case, I get another error:
    Duplicate export name 'fibonacci' for function 656 and function 657 @+14021
    ... Any ideas?
    s
    b
    • 3
    • 4
  • s

    sdeleuze

    02/25/2023, 10:13 AM
    Is there or could there be a way to improve a bit the DevXP by providing ways to create distribution in one directory with the resources like
    @orangy ndex.html
    , the
    .wasm
    file (and the
    .wat
    one when it will be restored) and the
    .js
    file and optionnaly run a web server without having to run a browser (broken on my Linux installation due to some assumption on the executable name + not super practical since a flag is usually needed)? Currently I do that with a script not sure if there is a better way. Also how are we supposed to deploy website without that?
  • o

    Oleg Yukhnevich

    02/25/2023, 11:18 AM
    How does K/WASM plan to support memory64 proposal, specifically current unsafe wasi interop apis, where pointer is UInt? Will it be similar to K/N with 2 different targets, or no?
    s
    • 2
    • 10
  • s

    sdeleuze

    02/25/2023, 3:10 PM
    Is Console available from Kotlin/Wasm?
    s
    • 2
    • 3
  • s

    sdeleuze

    02/25/2023, 4:40 PM
    Unless I am mistaken, KT-22635 looks like fixed with Kotlin/JS but not Kotlin/Wasm. Is it expected? This is fine with Kotlin/JS (thanks for fixing that BTW):
    fun main() {
    	window.onload = { document.body?.sayHello() }
    }
    With Kotlin/Wasm, I need to write:
    fun main() {
        window.onload = {
            document.body?.sayHello()
            null
        }
    }
    To make it compile.
    s
    • 2
    • 6
  • s

    sdeleuze

    02/25/2023, 7:18 PM
    https://twitter.com/sdeleuze/status/1629561336974680066
    d
    b
    • 3
    • 7
Powered by Linen
Title
s

sdeleuze

02/25/2023, 7:18 PM
https://twitter.com/sdeleuze/status/1629561336974680066
d

Daniele B

02/25/2023, 7:38 PM
do you plan any sample with Compose?
s

sdeleuze

02/25/2023, 7:39 PM
When ready sure
d

Daniele B

02/25/2023, 7:41 PM
Great! Any idea of when that could be? talking about weeks or months?
s

sdeleuze

02/25/2023, 7:42 PM
I don’t know, better to ask to @bashor if he can share some ETA.
b

bashor

03/08/2023, 10:13 PM
Likely weeks, a few months.
d

Daniele B

03/09/2023, 10:21 AM
I suppose Kotlin 1.9.0 release?
b

bashor

03/09/2023, 12:26 PM
it’s not directly connected to 1.9.0
View count: 9