Crdt.Transport 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Crdt.Transport --version 1.0.0
                    
NuGet\Install-Package Crdt.Transport -Version 1.0.0
                    
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="Crdt.Transport" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Crdt.Transport" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Crdt.Transport" />
                    
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 Crdt.Transport --version 1.0.0
                    
#r "nuget: Crdt.Transport, 1.0.0"
                    
#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 Crdt.Transport@1.0.0
                    
#: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=Crdt.Transport&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Crdt.Transport&version=1.0.0
                    
Install as a Cake Tool

Crdt

CI NuGet

High-performance, NativeAOT-ready Conflict-free Replicated Data Types (CRDTs) for modern .NET.

Crdt implements the full catalogue of CRDTs — counters, registers, sets, maps, flags, graphs, and sequence/text types — in state-based, delta-state, and operation-based flavours, with compact binary and System.Text.Json source-generated serialization.

Status: pre-release (0.9.x). APIs may change before 1.0.

✨ Why Crdt

  • Strong eventual consistency without coordination: replicas converge after exchanging state, deltas, or operations.
  • Fast: readonly struct building blocks, Span<T>/IBufferWriter<byte> serialization, BinaryPrimitives/Unsafe fast paths, no LINQ on hot paths.
  • NativeAOT & trimming clean on .NET 8/9/10 — the library is annotated IsAotCompatible, and the test suite itself is verified running as a NativeAOT binary.
  • Broad reach: targets netstandard2.1, net8.0, net9.0, net10.0 (polyfilled on older runtimes).

Supported target frameworks

TFM Notes
net10.0, net9.0, net8.0 Full feature set; NativeAOT supported.
netstandard2.1 Compatibility target (Unity / Mono / .NET Core 3.x) via polyfills; not itself AOT-published.

📦 Install

dotnet add package Crdt

The optional replication/transport layer — in-memory, TCP (with optional TLS), and UDP anti-entropy gossip, in state-based, delta-state, and operation-based modes — ships as a separate package:

dotnet add package Crdt.Transport

DTLS-secured datagram gossip (built on DtlsSharp) lives in a further opt-in package:

dotnet add package Crdt.Transport.Dtls

🧩 CRDT catalogue

Family Types
Counters GCounter, PNCounter
Registers LWWRegister<T>, MVRegister<T>
Sets GSet<T>, TwoPhaseSet<T>, LWWElementSet<T>, ORSet<T>
Maps ORMap<TKey,TValue>, LWWMap<TKey,TValue>
Flags EnableWinsFlag, DisableWinsFlag, GFlag
Graphs TwoPTwoPGraph, AddOnlyDag
Sequences / Text Rga<T>, LogootSequence<T>, LSeqSequence<T>, TreedocSequence<T>, YataSequence<T>, WootSequence<T>, Text

🔁 Replication models

  • State-based (CvRDT) — exchange and Merge full states. Robust to reordering and duplication.
  • Delta-state — propagate small deltas of the same lattice; converges with a causal delta protocol.
  • Operation-based (CmRDT) — propagate operations carrying their causal context; effects are idempotent / de-duplicated.

Crdt provides the data structures, merge/delta/operation logic, and serialization. Wiring replicas to a network (gossip, anti-entropy, broadcast) is left to the application.

📚 Documentation

The full developer guide lives in docs/:

  • Getting started — install, your first counter, merging replicas.
  • Data types — the full catalogue with usage examples for every CRDT.
  • Replication models — state-based, delta-state, and operation-based, and when to use each.
  • Serialization — the binary and JSON formats, value serializers, and hostile-input limits.
  • Architecture — semilattices, dots, the causal kernel (ORSWOT), and the Hybrid Logical Clock.
  • Performance & NativeAOT — AOT compliance, trimming, and benchmarking notes.
  • Transports — the optional Crdt.Transport package: in-memory and TCP gossip replication.

🛠️ Building from source

dotnet build Crdt.slnx -c Release
dotnet test  Crdt.slnx -c Release

Linting / formatting:

dotnet format Crdt.slnx --verify-no-changes
pwsh -NoProfile -File eng/check-line-length.ps1

NativeAOT test gate (publishes and runs the suite as a native binary):

dotnet publish tests/Crdt.Tests/Crdt.Tests.csproj -c Release -f net10.0 -r <rid> -p:AotTest=true

📄 License

MIT

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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

  • net8.0

  • net9.0

NuGet packages (17)

Showing the top 5 NuGet packages that depend on Crdt.Transport:

Package Downloads
Crdt.Transport.Dtls

DTLS-secured datagram gossip transport for Crdt.Transport, built on DtlsSharp (managed DTLS 1.2/1.3 with native OS backends).

Crdt.Transport.Mqtt

MQTT pub/sub gossip transport for Crdt.Transport, built on the Mqtt.Client package (MQTT 3.1.1/5.0, TCP/TLS/WebSocket).

Crdt.Consensus

Pluggable consensus abstractions, deterministic leader election, and heartbeat failure detection for Crdt.Transport.

Crdt.Transport.NanoMsg

Scalability-Protocols (BUS) gossip transport for Crdt.Transport, built on NanoMsgSharp (managed nanomsg/NNG over tcp, tls, ipc, ws, and inproc).

Crdt.Transport.Pgm

PGM (Pragmatic General Multicast, RFC 3208) gossip transport for Crdt.Transport, built on the pure-managed Pgm package.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.2 19,015 7/15/2026
1.1.1 411 7/13/2026
1.1.0 40,744 6/30/2026
1.0.5 407 6/30/2026
1.0.4 283 6/29/2026
1.0.3 246 6/27/2026
1.0.2 468 6/27/2026
1.0.0 165 6/26/2026