Swift for WebAssembly had a bunch of updates in Q3 2025. Some are great, some will break your CI. Here's what you need to know so you don't spend your weekend debugging build failures.
The Triple Name Change That Broke Everything
Swift renamed wasm32-unknown-wasi
to wasm32-unknown-wasip1
. If you're using --triple
anywhere in your build scripts, CI configs, or deployment tools, it's gonna break with a confusing error about unknown targets.
The rename makes it clear they're using WASI Preview 1, which is fine, but why break existing builds for naming clarity? They're preparing for WASI Preview 2 (wasip2
) but that's not here yet.
If you use --swift-sdk
instead of --triple
, you're fine. If not, time to grep through your entire build system and update everything. Fun weekend project.
Foundation Finally Works (Mostly)
Foundation is now included in Swift SDK for WebAssembly. This is huge because before this, porting Swift apps to WASM meant rewriting all your JSON parsing, HTTP calls, and file handling from scratch.
Embedded Swift still doesn't get Foundation because they're optimizing for tiny binaries. Makes sense but sucks if you need both small size and basic libraries.
I wasted way too much time porting our API client before Foundation support existed. Still fighting some weird compilation issues but at least I didn't have to rewrite the entire thing.
CI That Actually Tests WASM
The swiftlang/github-workflows
now has enable_wasm_sdk_build
and enable_embedded_wasm_sdk_build
flags. Finally, libraries can test WebAssembly compatibility in CI instead of discovering breakage when users complain.
Swift's core libraries are already using this. Good, because nothing's worse than a "works on my machine" library that fails to compile for WASM.
Before this, WASM support was basically "maybe it works, maybe it doesn't, try it and see." Now libraries can catch WASM breakage before shipping.
LLDB Debugging That Doesn't Suck
LLDB now supports WebAssembly debugging upstream. Finally you can set breakpoints and inspect variables instead of adding print()
statements everywhere like a fucking caveman.
It'll be in Swift LLVM 21. Debugging WASM won't require guessing what went wrong based on cryptic runtime errors anymore. Same LLDB commands you already know.
Before this, debugging Swift WASM was like debugging with your eyes closed. This is probably the most useful improvement for actually getting work done.
Supporting Libraries Getting Better
WasmKit 0.1.6 added Android support but dropped Swift 5.9. If you're still on 5.9, time to upgrade or get left behind.
JavaScriptKit (0.31-0.35) got a bunch of improvements:
- Better
JSClosure
APIs for concurrency that actually work JavaScriptFoundationCompat
module for bridging Foundation types- Enhanced Embedded Swift support
- BridgeJS improvements for JS/TypeScript interop
JavaScriptKit was always a bit finicky for complex JS integration. The new versions are much more stable and less likely to crash when you need to do anything beyond basic function calls.