ReactiveX/RxSwift is tracked by TopGit as a mobile project, with 24.6k stars on GitHub, written primarily in Swift. Reactive Programming in Swift
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Rx is a generic abstraction of computation expressed through Observable<Element> interface, which lets you broadcast and subscribe to values and other events from an Observable stream.
RxSwift is the Swift-specific implementation of the Reactive Extensions standard.
While this version aims to stay true to the original spirit and naming conventions of Rx, this project also aims to provide a true Swift-first API for Rx APIs.
Cross platform documentation can be found on ReactiveX.io.
Like other Rx implementations, RxSwift's intention is to enable easy composition of asynchronous operations and streams of data in the form of Observable objects and a suite of methods to transform and compose these pieces of asynchronous work.
KVO observation, async operations, UI Events and other streams of data are all unified under abstraction of sequence. This is the reason why Rx is so simple, elegant and powerful.
I came here because I want to ...
... understand
why use rx?
the basics, getting started with RxSwift
traits - what are Single, Completable, Maybe, Driver, and ControlProperty ... and why do they exist?
testing
tips and common errors
debugging
the math behind Rx
what are hot and cold observable sequences?
... install
Integrate RxSwift/RxCocoa with my app. Installation Guide
... hack around
with the example app. Running Example App
with operators in playgrounds. Playgrounds
... interact
All of this is great, but it would be nice to talk with other people using RxSwift and exchange experiences. Join Slack Channel
Report a problem using the library. Open an Issue With Bug Template
Request a new feature. Open an Issue With Feature Request Template
Help out Check out contribution guide
... compare
with Combine and ReactiveSwift.
... understand the structure
RxSwift is as compositional as the asynchronous work it drives. The core unit is RxSwift itself, while other dependencies can be added for UI Work, testing, and more.
It comprises five separate components depending on each other in the following way:
RxSwift: The core of RxSwift, providing the Rx standard as (mostly) defined by ReactiveX. It has no other dependencies.
RxCocoa: Provides Cocoa-specific capabilities for general iOS/macOS/watchOS & tvOS app development, such as Shared Sequences, Traits, and much more. It depends on both RxSwift and RxRelay.
RxRelay: Provides PublishRelay, BehaviorRelay and ReplayRelay, three simple wrappers around Subjects. It depends on RxSwift.
RxTest and RxBlocking: Provides testing capabilities for Rx-based systems. It depends on RxSwift.
Usage
Here's an example
In Action
Define search for GitHub repositories ...
let searchResults = searchBar.rx.text.orEmpty
.throttle(.milliseconds(300), scheduler: MainScheduler.instance)
.distinctUntilChanged()
.flatMapLatest { query -> Observable<[Repository]> in
if query.isEmpty {
return .just([])
}
return searchGitHub(query)
.catchAndReturn([])
}
.observe(on: MainScheduler.instance)
RxSwift doesn't contain any external dependencies.
These are currently the supported installation options:
Manual
Open Rx.xcworkspace, choose RxExample and hit run. This method will build everything and run the sample app
XCFrameworks
Each release starting with RxSwift 6 includes *.xcframework framework binaries.
Simply drag the needed framework binaries to your Frameworks, Libraries, and Embedded Content section under your target's General tab.
[!TIP]
RxSwift's xcframework(s) are signed with an Apple Developer account, and you can always verify the Team Name: Shai Mishali
Carthage
Add this to Cartfile
github "ReactiveX/RxSwift" "6.10.0"
$ carthage update
Carthage as a Static Library
Carthage defaults to building RxSwift as a Dynamic Library.
If you wish to build RxSwift as a Static Library using Carthage you may use the script below to manually modify the framework type before building with Carthage:
Note: There is a critical cross-dependency bug affecting many projects including RxSwift in Swift Package Manager. We've filed a bug (SR-12303) in early 2020 but have no answer yet. Your mileage may vary. A partial workaround can be found here.
The most recent commit recorded on ReactiveX/RxSwift was 2 months ago, based on the GitHub push timestamp. The repository has 4.1k forks — one of the better signals of community interest.
How many stars does ReactiveX/RxSwift have?
ReactiveX/RxSwift has 24.6k GitHub stars — refresh the page for the live number, or check github.com/ReactiveX/RxSwift. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What else is in the Mobile space?
ReactiveX/RxSwift is tracked by TopGit under the Mobile category, alongside 8 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What language is ReactiveX/RxSwift written in?
ReactiveX/RxSwift is written primarily in Swift. GitHub's language field is based on the largest share of bytes in the default branch.
What topics is ReactiveX/RxSwift associated with?
GitHub's repository topics for ReactiveX/RxSwift: "functional", "ios", "observer", "reactive", "reactivex", "rxswift", "swift", "unidirectional". TopGit's editorial category is Mobile.
Where do I read more about ReactiveX/RxSwift?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/ReactiveX/RxSwift is the definitive source.
Why is ReactiveX/RxSwift categorized under Mobile?
TopGit places ReactiveX/RxSwift in the Mobile category based on its GitHub topics and description (tagged: "functional", "ios", "observer"). Categories are assigned from real repository metadata, not editorial guesswork.
Read full README in the tab above.
Still deciding about RxSwift?
One click hands the question to an AI along with this page — see what it says about RxSwift.