Scala.js to Wasm—Exploring the Wasm backend for Scala.js with Sébastien Doeraene
The JVM-to-Web journey continues! In this episode, Thomas Steiner welcomes the original author of Scala.js, Sébastien Doeraene, to discuss the major, experimental leap to WebAssembly. You’ll learn why the team decided to target Wasm now and how it complements the existing JavaScript emission. This episode offers a technical deep-dive into how Scala’s powerful, nominal type system maps its objects and classes onto Wasm GC, and examines the critical details of interoperability, including what happens when a Scala object crosses the boundary to a JavaScript function. Finally, Sébastien covers the current status of the Wasm ecosystem for Scala.js, and the key limitations you need to know before you flip the `withExperimentalUseWebAssembly(true)` switch. Tune in to discover how a mature typed language is laying a fast, new foundation on the web!
Chapters:
0:00 - Commonalities between composing music and composing compilers
1:38 - Scala, Scala.js, Scala Native, and the Scala Center
11:01 - The "elevator pitch" for Scala.js
14:59 - Is Scala.js competing with TypeScript?
20:31 - What motivated the decision to target Wasm?
26:40 - How Scala.js utilizes Wasm GC
31:24 - What's actually crossing the boundary between JS and Scala.js?
37:37 - BigInt support in Scala.js
38:38 - The status of the library ecosystem for the Wasm target
41:40 - Sébastien's hobby project ported to Scala.js
44:02 - Is the Wasm backend purely a Scala.js thing for browsers?
52:38 - What developers should be aware of before flipping that `withExperimentalUseWebAssembly(true)` switch
58:28 - What Wasm proposals are you waiting for to unlock new features in Scala.js?
59:57 - Wasm, but not
Resources:
Sébastien Doeraene on GitHub → https://goo.gle/4pMPufo
Sébastien Doeraene at EPFL → https://goo.gle/3KTZZhu
Ensemble vocal Évohé → https://goo.gle/4pApQu5
Scala → https://goo.gle/4iYZwY1
Scala.js → https://goo.gle/4oYze9E
Scala Native → https://goo.gle/4rX4hp0
Scala Center → https://goo.gle/44uffZ8
Scala to TypeScript → https://goo.gle/4j37ZcM
Tyrian → https://goo.gle/4iZCOik
Laminar: https://laminar.dev/
Scala.js WebAssembly backend → https://goo.gle/4oT4bvV
Announcing Scala.js 1.19.0 → https://goo.gle/4aSYM4F
Wasm GC proposal: https://github.com/WebAssembly/gc
JSPI proposal → https://goo.gle/4s5cIik
Scala.js Interoperability → https://goo.gle/4afJdE1
Scaladex homepage with stats → https://goo.gle/4ja7jCr
FunLabryrinhte (Scala) → https://goo.gle/4oTghoL
FunLabryrinhte (original) → https://goo.gle/3KA8EWx
Bringing Scala to Server-Side Wasm → https://goo.gle/4pgwC7v
Scala.js Wasm Limitations → https://goo.gle/4s1jOnN
Custom descriptors proposal → https://goo.gle/4p8I7Og
Stack Switching Proposal → https://goo.gle/4pJG8B1
JS Primitives Builtins proposal → https://goo.gle/4akAnor
Shared-Everything Threads proposal → https://goo.gle/3MCCxGd
Watch more WasmAssembly → https://goo.gle/WasmAssembly
Subscribe to Chrome for Developers → https://goo.gle/ChromeDevs
#WebAssembly #Wasm #ChromeForDevelopers #Chrome
Speaker: Thomas Steiner
Products Mentioned: Web Assembly (Wasm), Chrome, WebAssembly for Chrome
Chrome for Developers
Making the web more awesome....