whatisgithub

What is r3?

cysharp/r3 — explained in plain English

Analysis updated 2026-06-26

3,793C#Audience · developerComplexity · 3/5Setup · easy

In one sentence

A faster, fixed reimplementation of Reactive Extensions for C# where errors no longer crash your event streams, all active subscriptions are tracked to prevent memory leaks, and performance benchmarks show meaningfully lower memory use.

Mindmap

mindmap
  root((R3))
    What it does
      Reactive Extensions for C#
      Event stream processing
      Subscription tracking
    Fixes vs old Rx
      Errors pass through
      No silent leak
      Faster scheduling
    Platforms
      Unity and Godot
      WPF and WinForms
      MAUI and Blazor
    Tech stack
      C#
      .NET 6 7 8
      NuGet
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the original dotnet/reactive library in a Unity game so errors in event pipelines no longer stop your subscriptions mid-game.

USE CASE 2

Build reactive UI event pipelines in WPF or WinForms that handle button clicks, timers, and live data feeds as streams without subscription memory leaks.

USE CASE 3

Integrate R3 into a Godot, MAUI, or Blazor project using the platform-specific integration packages included in the repository.

USE CASE 4

Find and fix forgotten subscriptions in a long-running desktop app by using R3's built-in subscription tracking to see all active observables.

What is it built with?

C#.NETNuGet

How does it compare?

cysharp/r3opentabletdriver/opentabletdriverpcl-community/pcl-ce
Stars3,7933,7933,795
LanguageC#C#C#
Setup difficultyeasymoderateeasy
Complexity3/53/52/5
Audiencedeveloperdesignergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Install via NuGet, platform-specific packages for Unity or Godot require their respective project setup before R3 integrates correctly.

License terms not mentioned in the explanation.

So what is it?

R3 is a reimplementation of Reactive Extensions (Rx) for C#, built by the same developer who created UniRx, a popular Rx library for the Unity game engine. Reactive Extensions is a programming pattern for handling streams of events over time, think button clicks, timers, or live data feeds, processed using a chain of operations. The original dotnet/reactive library has been around for many years, but its author believes several design decisions have not aged well, and R3 is the answer to those problems. The core complaint with the old library centers on three things. First, when an error occurred in a pipeline, the original Rx would stop the entire subscription, which caused difficult-to-debug behavior in long-running apps like games or desktop software. R3 changes this: errors pass through a separate channel called OnErrorResume, and the subscription keeps running unless you explicitly choose to stop it. Second, the scheduling system (IScheduler) in the old library was a source of poor performance. R3 replaces it with the newer TimeProvider pattern built into modern .NET. Third, the old library used an interface design that allowed hidden contract violations, R3 uses abstract classes to fully control the subscription lifecycle. A practical benefit of this redesign is that R3 tracks every active subscription. In apps with long lifecycles, such as games or GUI tools, it is easy to subscribe to an event and forget to clean it up. Accumulating thousands of these leaked subscriptions can quietly degrade performance. R3 makes all subscriptions visible so developers can spot and fix leaks. Performance benchmarks shown in the README compare R3 against the original library and show meaningfully lower memory allocation and faster execution, particularly in scenarios where many subscriptions are created and destroyed. The library is distributed as a NuGet package, supports .NET Standard 2.0 and 2.1 as well as .NET 6, 7, and 8, and includes extra integration packages for Unity, Godot, Avalonia, WPF, WinForms, WinUI3, MAUI, MonoGame, Blazor, and several other platforms. If you already know Rx, the API surface will feel familiar: you still create observables, chain operators with LINQ-style methods, and subscribe to results. The mental model carries over directly, only the internals and a few edge-case behaviors have changed. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
I'm migrating a C# app from dotnet/reactive to R3. Show me the key API differences and how to convert a basic observable subscription.
Prompt 2
Using R3 in a Unity C# script, set up an observable that listens to a button click event and debounces it so it only fires once every 300 milliseconds.
Prompt 3
Show me how R3's OnErrorResume works, write a C# example where an error in an observable pipeline passes through without stopping the subscription.
Prompt 4
How do I use R3's subscription tracking feature to list all currently active subscriptions in my app and find ones that were never disposed?

Frequently asked questions

What is r3?

A faster, fixed reimplementation of Reactive Extensions for C# where errors no longer crash your event streams, all active subscriptions are tracked to prevent memory leaks, and performance benchmarks show meaningfully lower memory use.

What language is r3 written in?

Mainly C#. The stack also includes C#, .NET, NuGet.

What license does r3 use?

License terms not mentioned in the explanation.

How hard is r3 to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is r3 for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.