~/talk

Swift for WebAssembly

Talkat #Pragma Conference 2024 · 2024-10-29..10-30· [webassembly, swift]
slides:none on file

Swift compiles to WebAssembly using the SwiftWasm toolchain and Carton to bundle modules, with JavaScriptKit for DOM interop and Wasmer or wasm‑kit for WASI runtime support. GoodNotes reuses about 100,000 lines of Swift via SwiftWasm; typical debug binaries hit 10–20 MB and the toolchain download is ~2 GB. Build modes: executables export _start, libraries export functions or use @Export/@Extern with C calling convention; WebAssembly 2’s component model promises higher‑level types and simpler interop.

AI-written summary · about

  1. 0:00Introduction to Swift for WebAssembly
  2. 8:17Hello World with Carton
  3. 12:33Manual WebAssembly compilation
  4. 19:47Building a WebAssembly library
  5. 24:20Exporting functions to JavaScript
  6. 27:28Importing JavaScript into Swift
  7. 29:24Interactive Connect 4 demo
  8. 34:47Reusing Swift across platforms
  9. 35:09Lessons learned from demos
  10. 39:01Conclusion and future outlook
~/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.