Swift for Wasm March 2026 Updates

Notable changes this month: JavaScriptKit release 0.49.0 with BridgeJS improvements, WasmKit continued Component Model work coupled with a few bug fixes, and ElementaryUI migrated its DOM interop to BridgeJS. Many thanks to Stephan Diederich, @erikbdev, Adin, @kateinoigakukun, @kebo, @krodak, @pcbeard, @ScottM, @sliemeobn, @wfltaylor, @xavgru for contributions!

Forum Discussions

  • [Pitch] Emscripten Target Support for Swift — proposes adding the Emscripten target (wasm32-unknown-emscripten) to the Swift toolchain, complementing the existing WASI target for projects that depend on C/C++ libraries already ported to Emscripten.

Documentation

Added WasmGuide.docc bundle with Swift for Wasm docs swift-for-wasm-examples#47, hosted on docs.swift.org.

Swift Toolchain

JavaScriptKit

5 releases this month (0.46.50.49.0). The main focus was BridgeJS — protocol existential lowering, imports of Promise-returning functions as async, integer and raw-value enum support, extension method codegen, and unretained string passing. Also fixed a use-after-free bug, added property access tracing to JSTracing, and gated ExperimentalCustomExecutors behind a Swift 6.4 compiler check.

  • Add property access tracing to JSTracing #687;
  • Fix use-after-free in BridgeJS #690;
  • BridgeJS: Fix codegen for async + throws exported methods #691;
  • BridgeJS: Pass String parameters unretained as (address, length) #688;
  • BridgeJS: Include properties and release() in declare global class stubs #693;
  • BridgeJS: Use shared decodeString for JSTypedClosure error path #696;
  • BridgeJS: Fix protocol existential lowering in Swift-to-JS direction #697;
  • BridgeJS: Support protocol types in closure parameters and returns #699;
  • BridgeJS: Expand integer and raw-value enum support #701;
  • BridgeJS: Correctly emit @JS methods in extensions #694;
  • BridgeJS: extension method support #706;
  • BridgeJS: Support imports of JS Promise as async Swift #707;
  • Fix Embedded, bump 6.3 Swift toolchain in test.yml #702;
  • Gate ExperimentalCustomExecutors usage behind Swift 6.4 compiler check #705;

WasmKit

Version 0.2.1 released on March 13. This month brought continued Component Model work, debugger improvements, WASI I/O fixes, and mprotect-based memory boundary checking.

  • Fix file descriptor leak #315;
  • Fix a few I/O-related WASI XFAILs #318;
  • Fix poll_oneoff and more I/O syscalls in WASI 0.1 #187;
  • Clean up sections batching in ComponentEncoder #323;
  • Fix lldb-dap connection, add decodingUnknownCommand test #324;
  • Analyse control flow in runPreservingCurrentBreakpoint #313;
  • CM WAT normalization: remove ComponentEncoder.GroupedFields #325;
  • Debugger fixes: add test coverage for multiple functions #326;
  • Fix core modules name section incompleteness #321;
  • ComponentLinker: add ComponentTypeSerializer #319;
  • Back atomic instructions by C11 stdatomic.h #308;
  • Add Caller.captureBacktrace() #328;
  • mprotect-based memory boundary checking #272;

ElementaryUI

Two releases this month (0.1.7, 0.1.8). The headline change was migrating DOM interop to BridgeJS (#76), along with migration to Swift 6.3 (#90), and Embedded build improvements (#68).

Performance: Added Swift benchmarks (#80), tweaks in ForEach and _KeyedNode (#81), fewer allocations for mounted nodes (#83), reworked mounting (#86), and less runtime work for attribute mounting (#88).

Fixes: @View macro on public and package types (#82), tuple fixes and tests (#84).


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:

16 Likes