Bit.Bcrdt 11.0.0-pre-10

This is a prerelease version of Bit.Bcrdt.
dotnet add package Bit.Bcrdt --version 11.0.0-pre-10
                    
NuGet\Install-Package Bit.Bcrdt -Version 11.0.0-pre-10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bit.Bcrdt" Version="11.0.0-pre-10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bit.Bcrdt" Version="11.0.0-pre-10" />
                    
Directory.Packages.props
<PackageReference Include="Bit.Bcrdt" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bit.Bcrdt --version 11.0.0-pre-10
                    
#r "nuget: Bit.Bcrdt, 11.0.0-pre-10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Bit.Bcrdt@11.0.0-pre-10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bit.Bcrdt&version=11.0.0-pre-10&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Bit.Bcrdt&version=11.0.0-pre-10&prerelease
                    
Install as a Cake Tool

Bit.Bcrdt

Real-time collaborative editing for .NET and Blazor, written natively in C#: a CRDT engine, a synchronization protocol, presence, offline-first persistence, selective undo and Blazor components. There is no JavaScript CRDT library underneath and no port of one - the engine, the wire format and the merge algorithm are all C#, and none of it needs JavaScript interop, so it runs the same in Blazor WebAssembly, Server and Hybrid, in a worker or in a console app.

Quick start

dotnet add package Bit.Bcrdt
using Bit.Bcrdt;

builder.Services.AddBitBcrdtServices(collaboration => collaboration
    .UseTransport(new BcrdtWebSocketTransportFactory("https://example.com/ws/bcrdt/{documentId}"))
    .UseStore(new BcrdtFileSystemDocumentStore("./documents")));
BcrdtCollaborativeDocument document = await collaboration.OpenAsync("design-review");

using (var transaction = document.BeginTransaction())
{
    document.Map.Set("title", "Q3 planning");
    document.Array("attendees").Push("Ada", "Grace");
    document.Text("notes").Insert(0, "Agenda:\n");
}

Two people running that against the same document identifier both end up with the same document, whether they were online at the time or not. For the SignalR transport add Bit.Bcrdt.SignalR; for the relay a server maps, add Bit.Bcrdt.Server.

Blazor

@using Bit.Bcrdt
@using Bit.Bcrdt.Blazor

<BcrdtCollaborationScope DocumentId="notes-42" User="_me" Context="document">
    <BcrdtPresenceView Presence="document.Presence" />
    <BcrdtTextArea Text="@document.Text("body")" Presence="document.Presence" />
</BcrdtCollaborationScope>

@code {
    private readonly BcrdtCollaboratorInfo _me = new("u-1", "Ada", BcrdtPresenceService.SuggestColor("u-1"));
}

That is a working collaborative editor with live presence, automatic reconnection and offline support.

  • BcrdtCollaborationScope opens a document for its content, cascades it, and closes it again.
  • BcrdtTextArea edits a BcrdtText: what the user types becomes the minimal CRDT edit, remote edits arrive without moving the caret or overwriting keystrokes still in flight, and the caret is published through presence.
  • BcrdtPresenceView lists the people on a document.
  • BcrdtComponentBase marshals change notifications onto the renderer and coalesces them onto a frame budget, and disposes its subscriptions with the component - the base for your own collaborative components.

No stylesheet to reference and no script to add: the one small module BcrdtTextArea needs is imported on demand. Works in Blazor WebAssembly, Server, Web App (including prerendering) and Hybrid.

Features

  • A YATA-family sequence CRDT with run-length-encoded blocks: BcrdtText (with rich-text marks), BcrdtArray, BcrdtMap and BcrdtSet, nestable inside each other.
  • Incremental binary updates that merge without a document, and a symmetric, loss-, duplication- and reorder-tolerant sync protocol with jittered reconnection - offline work flows both ways on reconnect, deletions included.
  • Presence: who is here, colours, and carets and selections anchored to content rather than to indices.
  • Append-only, checksummed persistence with compaction; in-memory and file-system stores.
  • Selective undo that reverses your own edits and leaves everyone else's alone.
  • Snapshots that restore any point in a document's history.
  • BcrdtTextSynchronizer and BcrdtTextInputBinding, which turn an input's whole new value into the minimal edit.
  • In-memory and WebSocket client transports; every seam - transport, store, client identity - is an interface.
  • .NET 8, 9 and 10; trim- and AOT-safe for the collaborative value model.

For AI agents

The demo site hosts an MCP server at https://bcrdt.bitplatform.dev/mcp (also served through https://bitplatform.dev/mcp) that answers from the shipped library: its API, its guide, the demo's working pages, and a merge inspector that runs the real engine.

Documentation

The full guide - choosing a data type, documents and transactions, input bindings, presence, offline and reconnection, persistence, undo, hosting models, transports and relays, extending the library and the architecture - is in the Bcrdt README. See it running at bcrdt.bitplatform.dev.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Bit.Bcrdt:

Package Downloads
Bit.Bcrdt.Testing

Test support for bit Bcrdt: a deterministic, seeded network simulator with loss, duplication, reordering, partitions and offline peers; random operation generators; a convergence harness; and an update corrupter for fuzzing the wire format. Framework-neutral, so it works with MSTest, xUnit or NUnit.

Bit.Bcrdt.Server

The ASP.NET Core relays for bit Bcrdt: the SignalR hub the Bit.Bcrdt.SignalR transport talks to, and the WebSocket endpoint the built-in WebSocket transport talks to. Both only relay - neither decodes a message nor holds a replica.

Bit.Bcrdt.SignalR

The SignalR client transport for bit Bcrdt. It carries no ASP.NET Core server dependency, so it runs in Blazor WebAssembly, Server and Hybrid alike; map the matching hub from Bit.Bcrdt.Server on the server.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-pre-10 0 10/20/2026