Support embedded Swift#116
Open
guoye-zhang wants to merge 10 commits into
Open
Conversation
guoye-zhang
commented
Apr 8, 2026
| public func withUnsafeBytesOfValue<Result>( | ||
| _ body: (UnsafeBufferPointer<UInt8>) throws -> Result | ||
| ) rethrows -> Result { | ||
| public func withUnsafeBytesOfValue<Result, Failure: Error>( |
Contributor
Author
There was a problem hiding this comment.
Is this API breakage real?
Member
There was a problem hiding this comment.
IIUC this is not source-breaking, but very likely ABI-breaking.
Member
There was a problem hiding this comment.
Correct. This is considered fine.
guoye-zhang
commented
Apr 8, 2026
MaxDesiatov
reviewed
Apr 10, 2026
Member
MaxDesiatov
left a comment
There was a problem hiding this comment.
It would be great for this PR or imminent followup PRs to also add Wasm (both embedded and non-embedded) jobs on CI to ensure no regressions are introduced in the future.
MaxDesiatov
reviewed
Apr 13, 2026
| name: WebAssembly Swift SDK | ||
| uses: apple/swift-nio/.github/workflows/wasm_swift_sdk.yml@main | ||
| with: | ||
| additional_command_arguments: "--target HTTPTypes" |
Member
There was a problem hiding this comment.
Would you mind using this one instead? Otherwise we'll have replicate Embedded Swift builds in swift-nio workflows.
embedded-swift:
name: Build with Embedded Swift
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.9
with:
enable_linux_checks: false
enable_macos_checks: false
enable_windows_checks: false
enable_wasm_sdk_build: false
enable_embedded_wasm_sdk_build: true
swift_flags: --target HTTPTypes
MaxDesiatov
reviewed
Apr 15, 2026
| fatalError() | ||
| } | ||
| #else | ||
| #if !hasFeature(Embedded) || os(WASI) |
Member
There was a problem hiding this comment.
Seems like Mutex is only available on WASI in main snapshots, but not 6.3 or 6.2:
Suggested change
| #if !hasFeature(Embedded) || os(WASI) | |
| #if !hasFeature(Embedded) || (os(WASI) && compiler(>=6.4)) |
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.
In order for swift-http-api-proposal to support embedded Swift, swift-http-types has to support embedded Swift first.
Is there a CI we can enable for embedded?