A TypeScript utility library offering data-first and data-last functions for arrays, objects and other common operations.
ReactiveX/RxSwift
A Swift implementation of Reactive Extensions (Rx) for composing asynchronous events and data streams via Observable sequences.
- Stars
- 24,627
- Forks
- 4,147
- Open issues
- 19
- Last commit
- 2 months ago
What is it?
RxSwift brings the Reactive Extensions (ReactiveX) model to Swift. It represents asynchronous work, UI events, KVO observations and other data streams as Observable sequences, which can be transformed, filtered and combined with a large set of operators, and subscribed to for their values and completion events.
The project is split into several modules. RxSwift is the core with no external dependencies. RxCocoa adds Cocoa-specific helpers for iOS, macOS, tvOS and watchOS, such as bindings for UIKit and AppKit controls and shared sequences and traits like Driver. RxRelay provides PublishRelay, BehaviorRelay and ReplayRelay, while RxTest and RxBlocking support testing Rx-based code.
RxSwift can be installed with Swift Package Manager, Carthage, XCFrameworks or git submodules. The repository includes an example app and documentation covering getting started, traits, testing and common pitfalls.
Key features
- 01Observable sequences unify async operations, UI events and KVO streams.
- 02A broad set of operators for transforming, filtering and combining streams.
- 03RxCocoa provides bindings and shared sequences for Apple UI frameworks.
- 04RxRelay offers PublishRelay, BehaviorRelay and ReplayRelay wrappers around subjects.
- 05RxTest and RxBlocking support testing Rx-based code.
- 06Installable via Swift Package Manager, Carthage or XCFrameworks.
Use cases
- Binding network search results to a table view with debouncing and cancellation.
- Combining multiple asynchronous API calls into a single reactive pipeline in an iOS app.
- Driving UI state from user input and model changes in MVVM-style architectures.
- Writing unit tests for asynchronous stream logic using RxTest.
Quick start
- 1
Add RxSwift as a dependency in Package.swift
- 2
Build the project with Swift Package Manager
swift build
Things to know
- The README notes an unresolved Swift Package Manager cross-dependency bug (SR-12303) that may affect builds.
In collections
Topics
FAQ
- What is RxSwift?
- A Swift implementation of Reactive Extensions (Rx) for composing asynchronous events and data streams via Observable sequences. RxSwift brings the Reactive Extensions (ReactiveX) model to Swift. It represents asynchronous work, UI events, KVO observations and other data streams as Observable sequences, which can be transformed, filtered and combined with a large set of operators, and subscribed to for their values and completion events.
- Is RxSwift free to use? What license does it have?
- RxSwift is open source under the MIT license. Check the license terms before using it in commercial products.
- Is RxSwift still maintained?
- Updated within 6 months. The last commit to RxSwift was on Sep 4, 2026.
- What can I use RxSwift for?
- Binding network search results to a table view with debouncing and cancellation. Combining multiple asynchronous API calls into a single reactive pipeline in an iOS app. Driving UI state from user input and model changes in MVVM-style architectures. Writing unit tests for asynchronous stream logic using RxTest.
- How do I install RxSwift?
- Add RxSwift as a dependency in Package.swift Build the project with Swift Package Manager: swift build
- Where can I get RxSwift?
- The source code and installation instructions are on GitHub: https://github.com/ReactiveX/RxSwift
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An OCaml library for building computations that update efficiently when their inputs change, based on self-adjusting computation.
A Go framework for building terminal user interfaces using The Elm Architecture's model-update-view pattern.
A Java VM implementation of Reactive Extensions for composing asynchronous and event-based programs with observable sequences.
Simple, scalable state management for JavaScript and TypeScript apps, with automatic dependency tracking and optimal re-rendering.
A reactive Python notebook that auto-reruns dependent cells, stores notebooks as plain .py files, and can run as scripts or deployed apps.