LoroCs 1.8.1

dotnet add package LoroCs --version 1.8.1
                    
NuGet\Install-Package LoroCs -Version 1.8.1
                    
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="LoroCs" Version="1.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LoroCs" Version="1.8.1" />
                    
Directory.Packages.props
<PackageReference Include="LoroCs" />
                    
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 LoroCs --version 1.8.1
                    
#r "nuget: LoroCs, 1.8.1"
                    
#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 LoroCs@1.8.1
                    
#: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=LoroCs&version=1.8.1
                    
Install as a Cake Addin
#tool nuget:?package=LoroCs&version=1.8.1
                    
Install as a Cake Tool

loro-cs NuGet

C# bindings for the loro CRDT library.

Note: The current bindings are very bare bones. We are happy to accept pull requests that help make the loro API more accessible and idiomatic for C# developers!

Overview

This project provides .NET (C#) bindings for the loro CRDT library, enabling cross-platform, high-performance collaborative data structures in .NET applications. It uses Rust for the core implementation and exposes a C#-friendly API via native interop.

Features

  • Cross-platform: Supports Windows, Linux, and macOS (x64, x86, arm64)
  • Modern .NET API for collaborative data structures
  • Native performance via Rust FFI
  • Distributed, real-time collaboration support

Getting Started

Prerequisites

  • Platform support: Windows, Linux, or macOS (x64, x86, arm64)

Installation

The NuGet package includes the managed C# library and native binaries for all major platforms/architectures. Install via NuGet:

dotnet add package LoroCs

Usage Example

using LoroCs;
using LoroCs.Extensions;

// Example usage (API subject to change)
var doc = new LoroDoc();
doc.GetMap("root".ToLoroContainerIdLike());

Building from Source

Rust Native Library

The native library is built using Rust and UniFFI. To build native artifacts and copy them for the C# project:

Windows (PowerShell/x64)
pushd .\loro-cs
cargo build --release
Copy-Item .\target\release\loro_cs.dll ..\LoroCs\LoroCs\..\..\artifacts\loro_cs-win-x64\loro_cs.dll -Force
Linux (bash/x64)
pushd ./loro-cs
cargo build --release
mkdir -p ../../artifacts/loro_cs-linux-x64-ubuntu-latest
cp ./target/release/loro_cs.so ../../artifacts/loro_cs-linux-x64/loro_cs.so
macOS (bash/arm64)
pushd ./loro-cs
cargo build --release
mkdir -p ../../artifacts/loro_cs-osx-arm64-macos-latest
cp ./target/release/loro_cs.dylib ../../artifacts/loro_cs-osx-arm64/loro_cs.dylib

C# Project

Build the C# project and pack the NuGet package:

dotnet build
# or to create a NuGet package:
dotnet pack

Cross-Platform Builds

Cross-platform native builds and NuGet packaging are automated via GitHub Actions. See .github/workflows/release.yml for details.

Contributing

Contributions are welcome! Please open issues or pull requests.

License

This project is licensed under the MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.8.1 118 9/24/2025
1.6.0 157 9/2/2025
1.5.11 423 7/25/2025
1.5.11-alpha.2 519 7/23/2025
1.5.10 545 7/22/2025
1.5.9 155 6/23/2025
1.5.9-beta.4 128 6/23/2025
1.5.9-beta.3 125 6/23/2025
1.5.9-beta.2 125 6/23/2025
1.5.9-beta.1 268 6/10/2025
1.5.8 409 6/5/2025
1.5.1 157 5/27/2025