Swift for WebAssembly - How To Use Swift In Your Web App
summary
Shows step‑by‑step how to compile Swift to WebAssembly using the SwiftWasm toolchain (Carton plugin), JavaScriptKit and a WASI runtime, and how to load modules in a normal web app or run them with wasmer. Demos include a Carton hello world, a reusable reactor library (initialize + exports) for a dice UI, a streaming graph returning i32s, and a multiplayer Connect‑4 that reuses a shared Swift library across front end and Vapor back end (100% domain code reused). Notes: Swift 6 annotations simplify exports, binaries today run megabytes in size, and a macro proof‑of‑concept reports up to 10x build time improvements.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 2:35What is WebAssembly
- 3:47Swift on the web and server
- 6:32WebAssembly plugins for Swift
- 7:44Tooling and setup
- 9:31Hello world demo
- 18:17JavaScript interaction
- 24:33Manual WebAssembly compilation
- 26:16WASI and module loading
- 35:39Libraries and reactors
- 37:52Exporting and importing
- 41:19Interactive graph demo
- 45:11Connect 4 game demo
- 48:25Final thoughts and future
related talks
36mSwift for WebAssembly
20mThe Journey of Swift's WebAssembly Support
41mSwift for WebAssembly
32mIntroduction to WebAssembly for Swift Developers
50mWeb Assembly
53mWebAssembly – To the browser and beyond!
41mDemystifying WebAssembly, Through the Eyes of A Beginner
29mUsing Web Assembly to speed up your WEB Application
