Swift for Wasm June 2026 Updates

Notable changes this month: the Swift.org blog covered how Goodnotes shipped its app to the web with Swift and WebAssembly; Emscripten support improved in the Swift compiler, the standard library, and the test suite; JavaScriptKit shipped multiple releases (0.54.0–0.56.0) with substantial BridgeJS work; WasmKit 0.3.0 released, bringing initial Component Model support with three new Wasm proposals (SIMD, Atomics, Exception Handling); and ElementaryUI reached 0.4.0.

Many thanks to @etcwilde, @jackguac, @kateinoigakukun, @krodak, @sliemeobn, @wfltaylor for contributions!

Blog Posts

Forum Discussions

Swift Toolchain

On main, toolchain work this month mostly focused on improvements to Emscripten support:

  • utils/build-script: extract Wasm helpers from WASI-only products swift#89549;
  • wasistdlib.py: add SILOptimizer to lit test paths swift#89420;
  • CMake: add Emscripten build system configuration swift#89768;
  • wasiswiftsdk: put the toolchain version into the Swift SDK bundle name swift#89841;
  • Synchronization: use busywait when wasi-libc opts into busywait mode swift#89829;
  • Enable the lit test suite for wasm32-unknown-emscripten swift#89806;
  • stdlib: add an EmscriptenLibc overlay swift#89797;
  • Split ELF and Wasm Swift runtime registration files swift#89930;
  • stdlib: add necessary EmscriptenLibc conditions swift#89799;
  • Embedded: fix concurrency dynamic-isolation linker errors swift#87877;
  • Add tests for swiftasyncc tail calls on Wasm swift#88074;
  • Enable Emscripten in LocalTestingDistributedActorSystem.swift swift#87797;

JavaScriptKit

The most notable additions, landing across the 0.54.00.56.0 releases, were BridgeJS support for associated-value and case enums, throwing/async closures, and Swift doc comments carried through to the generated .d.ts.

  • Change Data.construct(from uint8Array:) return type from Data? to Data #752;
  • BridgeJS: support optional @JS struct in imported function signatures #755;
  • BridgeJS: support case enums as imported function parameters and returns #756;
  • BridgeJS: use a BigInt zero placeholder for Wasm i64 in generated JS #757;
  • BridgeJS: support non-ConvertibleToJSValue async exported return types #758;
  • BridgeJS: support optional @JSClass as exported function parameters #754;
  • Fix error descriptions for Embedded Swift compatibility #759;
  • BridgeJS: fix reject path of zero-parameter async throwing exports #760;
  • BridgeJS: support associated-value enums in import and async paths #764;
  • BridgeJS: support throws and async for closures #766;
  • BridgeJS: normalize Wasm pointer offsets in JS #768;
  • BridgeJS: emit static members in declare global class declarations #772;
  • BridgeJS: include Swift doc comments in generated .d.ts #771;
  • BridgeJS: export types using a separate JS representation #750;

WasmKit

WasmKit 0.3.0 shipped with initial WebAssembly Component Model support behind a non-default ComponentModel package trait (a binary parser/encoder, ComponentInstance/ComponentLoader, and CLI invocation of simple components with WAVE-encoded arguments); three new core-Wasm proposals (Fixed-Width SIMD, Atomics, and Exception Handling); substantially expanded WASIp1 coverage (poll_oneoff timers, an in-memory file system, thread-safety, and fd-leak/IO fixes); and a move to typed throws via a unified WasmKitError coinciding with the minimum supported Swift version raised to 6.3.

Notable changes merged in June:

  • Add support for the WebAssembly Exception Handling proposal #311;
  • Represent Component Model valtypes as type index or inline primitive #353;
  • Make WASIBridgeToHost thread-safe #347;
  • Per-node locking for the in-memory WASI file system #358;
  • Make InstructionTranslator non-copyable #209;
  • SystemExtras: stop shadowing the C stat type (fixes build with swift-system 1.7.0) #349;
  • Add Sendable conformance to CatchClause and TryCatch #355;

ElementaryUI

Version 0.4.0 released, upgrading to JavaScriptKit 0.55 and broadening the swift-collections dependency version range. As with 0.3.0, existing projects need to reinstall the bundled BrowserRuntime npm package and clear the Vite dev cache (see the release notes for the exact commands).

  • Upgrade to JavaScriptKit 0.55 #108;
  • Unpin swift-collections and bump to 1.6.0 #107;
  • Fix attributes without values #110;

Thank you for reading, and please feel free to add any comments or suggestions if we missed anything!

If you'd like to catch up with changes from previous months, here's a list of relevant updates:

9 Likes