This repository was archived by the owner on Jun 19, 2026. It is now read-only.
Bring Swift to parity#5
Merged
Merged
Conversation
Key findings: - Swift codegen already works (16/17 spec tests pass) - Fixed enum variant naming to use lowerCamelCase - Fixed preregisterChannels to be static method - Fixed spec error codes (channeling.unknown, etc.) - Only streaming tests fail (Tx/Driver ordering issue) Archived obsolete phases 002-012 since codegen works. Revised plan: only 3 phases remain (~5-9 hours total).
decodeU16, decodeI16, and decodeU32 were using fixed-width byte reads instead of varint encoding as required by Postcard format. This caused 'truncated' errors when parsing request payloads, making streaming tests fail with immediate error responses. All 17 spec tests now pass (100%). All 39 Swift runtime tests still pass.
Added r[impl ...] annotations to Swift runtime files: - COBS.swift: transport framing rules - Channel.swift: channeling rules, added deliverReset/deliverCredit - Driver.swift: message handling, hello, goodbye, lifecycle rules - Wire.swift: message types, metadata rules - Postcard.swift: encoding rules - RoamRuntime.swift: error handling rules Swift now has 84% impl coverage (73/87 rules), exceeding Rust's 80%. Remaining 14 uncovered rules are for unimplemented features: - Flow control with credit (byte accounting, credit consume/overrun) - Advanced channel lifecycle (speculative, immediate-data)
swift-nio 2.87.0+ requires Swift 6.0, but CI runs Swift 5.10. Pin to .upToNextMinor(from: "2.86.0") to use 2.86.2.
- Update CI to use depot-macos-15 (Swift 6) - Update Package.swift to swift-tools-version: 6.0 - Use swift-nio 2.92.0+ (requires Swift 6) - Fix Binding.swift: use Mirror for optional unwrapping - Fix Driver.swift: capture continuation as let for Sendable - Fix Transport.swift: capture continuation as let for Sendable One warning remains: ByteToMessageHandler Sendable conformance is explicitly unavailable in SwiftNIO - this is benign.
The subject-swift.sh script expects .build/release/subject-swift
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Key findings:
Archived obsolete phases 002-012 since codegen works. Revised plan: only 3 phases remain (~5-9 hours total).