feat: Enable WebAssembly compilation#3
Merged
Merged
Conversation
Add wasm (wasm32-unknown-wasip1) support in Package@swift-5.9.swift: depend on upstream apple/swift-nio plus the standalone PassiveLogic/nio-async-runtime, and consume the wasm-safe PassiveLogic sqlite-nio and async-kit forks (pinned to the same version ranges as upstream, resolved once those forks are tagged). Import NIOAsyncRuntime's NIOThreadPool on wasi and NIOPosix elsewhere, gated on os(WASI). NIOPosix is gated to non-wasi; non-wasm builds are unchanged. Co-authored-by: Scott Marchant <scottm@passivelogic.com>
krodak
force-pushed
the
feat/wasm-compilation
branch
from
July 21, 2026 16:55
5aff138 to
abac88b
Compare
krodak
marked this pull request as ready for review
July 23, 2026 11:06
Collaborator
Author
|
Merging — this completes the wasm fork chain (nio-async-runtime 1.0.1 → async-kit 1.22.0 → sqlite-nio 1.12.9 → sqlite-kit). Deps resolve against the tagged releases and CI is green (wasm + linux 6.1/6.2/6.3 + macOS). @scottmarchant flagging for visibility 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add WebAssembly (
wasm32-unknown-wasip1) support to SQLiteKit. Uses upstreamapple/swift-nioplus the standalonePassiveLogic/nio-async-runtime, and consumes the wasm-safePassiveLogicsqlite-nioandasync-kitforks. ImportsNIOAsyncRuntime'sNIOThreadPoolon wasi andNIOPosixelsewhere. On Swift 6.3 SPM selects thePackage@swift-5.9.swiftvariant, which carries the wasm wiring.Draft: references
PassiveLogic/sqlite-nioandPassiveLogic/async-kitby version, and those tags do not exist yet (their wasm PRs need to merge and tag first). CI cannot resolve dependencies until then. Ready to finalize once the sibling tags land.Links
What changed
Package@swift-5.9.swift- depend onapple/swift-nio+PassiveLogic/nio-async-runtime; pointsqlite-nioandasync-kitat the PassiveLogic forks; gateNIOPosixto non-wasi andNIOAsyncRuntimeto wasi.Sources/SQLiteKit/SQLiteConnectionSource.swift-#if os(WASI)importNIOAsyncRuntime(drop-inNIOThreadPool),NIOPosixelsewhere..github/workflows/test.yml- enable the wasm job (with_wasm: true).Tested
swift build(native + wasm, resolved against the sibling forks)