Mastodon Async Combine | My Portfolio

Async Combine

Developed in 2025 | Just Me

Project Briefing

AsyncCombine is a lightweight Swift library that brings familiar Combine-style patterns like sink, assign, and store(in:) into the modern async/await world.

Instead of building on top of Combine’s publishers, AsyncCombine uses AsyncSequence and Swift Concurrency directly. This gives you a clean, dependency-free way to react to values over time, integrate with Swift’s new @Observable / Observation framework, and bind state into your UI - all without pulling in Combine or juggling multiple reactive abstractions.

At the heart of the library is CurrentValueRelay, a replay-1 async primitive inspired by Combine’s CurrentValueSubject. It gives you a simple, portable way to bridge stateful streams between your domain logic and your presentation layer, while still playing nicely with async/await and structured concurrency.

AsyncCombine handles the plumbing so you can focus on your app’s behaviour, not your glue code.

AsyncCombine will:

  • Provide familiar operators like sink, assign, and store(in:) for AsyncSequence-based streams.
  • Offer CurrentValueRelay, a replay-1 async primitive for stateful, observable values.
  • Make it easy to react to changes in @Observable models using Swift’s Observation framework.
  • Help you bind async state to UI across platforms (SwiftUI, UIKit, AppKit) without needing Combine.
  • Let you centralise and manage the lifetime of async subscriptions in a predictable way.
  • Stay focused and lightweight — no global runtime, no magic, just small composable tools built on async/await.



Technical Details

  • Written in pure Swift and built on Swift Concurrency (AsyncSequence, Task, etc.).
  • Designed to work with Swift 5.10 and Swift 6 toolchains.
  • Suitable for iOS, macOS, watchOS, and tvOS apps that use async/await.
  • Integrates with Swift’s Observation framework to turn @Observable models into async streams.
  • Distributed via Swift Package Manager.
  • Open source and developed in the open on GitHub, with unit tests to help ensure correctness and stability.