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
- WASI: include
<wasi/api.h>explicitly inCFPlatformswift-corelibs-foundation#5440; - Rename
WasmSwiftSDK->WASISwiftSDK#88121; - Docs: adjust WebAssembly compiler build commands #88129;
- Bump
wasi-sdkto 31 inupdate-checkout#88028;
JavaScriptKit
5 releases this month (0.46.5–0.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+throwsexported methods #691; - BridgeJS: Pass
Stringparameters unretained as (address, length) #688; - BridgeJS: Include properties and
release()in declare global class stubs #693; - BridgeJS: Use shared
decodeStringforJSTypedClosureerror 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
@JSmethods in extensions #694; - BridgeJS: extension method support #706;
- BridgeJS: Support imports of JS
PromiseasasyncSwift #707; - Fix Embedded, bump 6.3 Swift toolchain in
test.yml#702; - Gate
ExperimentalCustomExecutorsusage 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_oneoffand more I/O syscalls in WASI 0.1 #187; - Clean up sections batching in
ComponentEncoder#323; - Fix
lldb-dapconnection, adddecodingUnknownCommandtest #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: addComponentTypeSerializer#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: