The Journey of Swift's WebAssembly Support
summary
The talk describes how SwiftWasm enables compiling Swift to WebAssembly by using a patched Swift calling convention in LLVM and a SIL-level cross-module dead-code-elimination pass to strip unused protocol methods. It covers a browser playground that compiles server-side to Wasm and runs in the browser, and tooling such as JavaScriptKit, Carton, and the SwiftUI-compatible Tokamak; size optimizations reduced a hello-world from 8.5MB to 3.5MB, though ICU and standard-library granularity still bloat output.
AI-written summary · about
chapters (9)
- 0:00Swift WebAssembly intro
- 6:28Road to WebAssembly support
- 9:19LLVM to WebAssembly
- 10:23SwiftPM core components
- 11:54JavaScriptKit and Carton
- 12:41SwiftUI-compatible UI lib
- 13:26Binary size bloat causes
- 15:39GSoC achievements
- 18:40Current status and future
related talks
55mSwift for WebAssembly - How To Use Swift In Your Web App
36mSwift for WebAssembly
32mIntroduction to WebAssembly for Swift Developers
55mSwift for WebAssembly - How To Use Swift In Your Web App
41mSwift for WebAssembly
53mWebAssembly
49mWasmer Things: An Upside-Down Guide to WebAssembly
16mWhy WebAssembly
