Swift for Wasm January 2026 Updates

Swift for Wasm January 2026 Updates

I'm excited to share our recent progress by the Swift for WebAssembly community.

Our number of active contributors is growing, and we're happy to see Simon Leeb announcing the launch of ElementaryUI website. ElementaryUI is a new framework for creating dynamic web apps using Swift, powered by Embedded Swift for WebAssembly.

In some other notable news, we have updates for Thread and NSLock availability, re-enabled reg2mem compiler optimization, agents skills repository, improved JS-Swift interop with BridgeJS, experimental autodiff support, expanded Wasm features support in WasmKit, and many more improvements throughout the Swift ecosystem.

Check out the full list of improvements below!

Swift Toolchain

  • wasmstdlib.py added SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING in main (#86552) and 6.3 (#86656);
  • Re-enabled aggressive reg2mem optimization when targeting Wasm in main (#86624) and 6.3 (#86658), fixing #77567;
  • CMake: added option for header-only clang resource installation #86548;
  • tests: enabled more Embedded Swift (#86639) and DebugInfo (#86742) tests for Wasm;
  • NSLock and Thread are now available for wasip1-threads target #5293;
  • WasmKit 0.2.0 now included in main development snapshots #86440;
  • Fixed build errors (#86533) when passing --enable-code-coverage to swift build in #86572.

JavaScriptKit

BridgeJS

  • Macro-annotated imports from TypeScript #499;
  • Support export { thing } from "pkg" form in bridge-js.d.ts #506;
  • Fix enumHelper availability #493;
  • Import TypeScript enums into Swift #521;
  • Support closure types in imported JS APIs #524;
  • Support UnsafePointer-family types #525;
  • Add init(unsafelyCopying:) for @JS structs #527;
  • Allow imports from globalThis #530;
  • Fix codegen for Float/Double raw value enums in struct fields and optional context #533;
  • Support @JS Swift struct types in imported JS signatures #535;
  • Support bridging Swift arrays to JS #542.

WasmKit

  • WASI: added new MemoryFileSystem API for better virtualization support #230;
  • WebAssembly Text Format: added threads instructions parsing support #257;
  • WasmParser: added SIMD instructions parsing support #263;
  • Implemented SIMD instructions in Wasm runtime #270;
  • Implemented threads and atomic instructions in Wasm runtime #284;
  • WASI: Implemented path_readlink syscall #261;
  • Adopted typed throws in the WAT module #265;
  • Added WasmParserBenchmark, now with most benchmarks running on CI #278.

swift-async-algorithms

  • Wasm Compilation: Improved support for compiling to non-pthreads WASI platforms #389;
  • Improved documentation on Wasm threading support #393.

swift-log

  • Added locking support when compiling to pthread-supporting WASI platforms #398.

swift-nio

  • Enabled dependencies on NIOEmbedded when building for WASI #3484;
  • Enabled dependencies on NIOPosix when building for WASI #3485.

ElementaryUI

  • Launched elementary.codes with guides and templates to get started with building Swift apps in the browser. ElementaryUI is a web frontend framework inspired by SwiftUI, and powered by Embedded Swift for WebAssembly to achieve an impressively small binary footprint.

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:

12 Likes