Sendable & Swift 6 concurrency
SwiftSonic targets Swift 6 strict concurrency without warnings. Public types are Sendable; the client is an actor; the API never hands back implicitly-shared mutable state.
What this gets you
Section titled “What this gets you”- No data-race warnings from
-strict-concurrency=complete. - Response models can be passed across
Task, actor, andMainActorboundaries without@unchecked Sendableband-aids. - Closures the library invites you to provide (logging hook, custom transport adapters) declare their isolation explicitly.
What you need to do
Section titled “What you need to do”If your project is on Swift 5 with progressive concurrency adoption, nothing — SwiftSonic stays out of the way. If you’ve enabled -strict-concurrency=complete (the default in Swift 6 mode), it should compile clean.
Caveats
Section titled “Caveats”TODO: list any types in 0.6.x that are deliberately not
Sendable(if any), and document why. Verify by grepping@unchecked SendableandnonisolatedinSources/SwiftSonic/.
Migration notes
Section titled “Migration notes”If you’ve used pre-0.6 SwiftSonic, see the release notes for any breaking concurrency-related changes.