WebAssembly is a game changer A binary instruction format for a stack-based machine Designed to be • Portable • Size- and Load-time efficient • Secure by Sandbox 7
Upstreaming patches • 44 patches for apple/swift • 16 patches for apple/swift-corelibs-foundation • 14 patches for apple/swift-package-manager • 4 patches for LLVM They are made by only 2 people! 36
Swift Concurrency on Wasm JavaScriptKit provides a global executor implementation based on JS event-loop import JavaScriptEventLoop import JavaScriptKit JavaScriptEventLoop.installGlobalExecutor() func printZen() async throws { let fetch = JSObject.global.fetch.function! let response = try await JSPromise(fetch("https://api.github.com/zen").object!)!.value let text = try await JSPromise(response.text().object!)!.value print(text) } 37