-
-
Notifications
You must be signed in to change notification settings - Fork 61
Resolve issues breaking Swift Wasm builds for sql-kit #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
… a newer version of swift-nio that supports wasm, and needed to narrow scope from the broad NIO dependency to the true dependency of just NIOCore.
Those compiling for wasm will need to find their own version of nio that compiles to wasm. In the near future, most latest versions of nio will compile to wasm, so this shouldn't be an issue.
scottmarchant
commented
Jun 25, 2025
scottmarchant
commented
Jun 25, 2025
35 tasks
0xTim
reviewed
Jun 25, 2025
1 task
…atform. Otherwise, leave exports and dependencies unchanged to minimize any disruption to downstream dependencies.
…is a release containing the latest wasm compilation fixes.
scottmarchant
commented
Jul 14, 2025
gwynne
requested changes
Jul 28, 2025
…dependencies. Latest testing indicates this won't be breaking to scope down to just NIOCore.
gwynne
approved these changes
Jul 28, 2025
Note, if anyone encounters issues with this change due to reliance on the sql-kit export of NIO, then after consuming this change, you may need to add the following import if previously relying on the implicit import.
|
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.
These changes are now available in 3.33.1
Summary
This PR adds support for compiling sql-kit to wasm using the Swift SDK for WebAssembly.
This PR is part of a larger effort by a company called PassiveLogic to enable broad support for Swift WebAssembly.
Details
NIOCore
instead of the broaderNIO
.Notes
Testing done
swift build
completes without errorsswift build --swift-sdk wasm32-unknown-wasi
completes without errors, when using a compatible nio version.swift build --swift-sdk wasm32-unknown-wasip1-threads
completes without errors, when using a compatible nio version.swift package --swift-sdk wasm32-unknown-wasip1-threads js --use-cdn
Impact Risk
There is a chance the changes to the manifest and exports could be a breaking change somewhere, if downstream dependencies relied on those pieces for their one and only intrinsic inclusion of the entire NIO dependency beyond NIOCore.
There are solutions to narrow the scope to just wasm compilation for those changes, if that is an issue. But I chose to leave them this way since it is a little cleaner solution.