Skip to content

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.

  • No data-race warnings from -strict-concurrency=complete.
  • Response models can be passed across Task, actor, and MainActor boundaries without @unchecked Sendable band-aids.
  • Closures the library invites you to provide (logging hook, custom transport adapters) declare their isolation explicitly.

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.

TODO: list any types in 0.6.x that are deliberately not Sendable (if any), and document why. Verify by grepping @unchecked Sendable and nonisolated in Sources/SwiftSonic/.

If you’ve used pre-0.6 SwiftSonic, see the release notes for any breaking concurrency-related changes.