Fluxum.Sdk 0.2.1

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

Fluxum C# SDK

The async/await .NET client for the Fluxum realtime database (SPEC-011, T7.6), distributed as the Fluxum.Sdk NuGet package. No third-party dependencies — the SDK carries its own minimal MessagePack codec and FluxBIN row reader.

dotnet add package Fluxum.Sdk
using Fluxum.Sdk;

await using var db = await Connection.ConnectAsync(
    "fluxum://127.0.0.1:15801",
    System.Text.Encoding.UTF8.GetBytes("my-token"),
    tables); // from `fluxum generate --lang csharp`

await db.SubscribeAsync(new[] { "SELECT * FROM ChatMessage" });
await db.CallReducerAsync("send_chat", new object?[] { 1, "hello" });
// TxUpdates land in db.Cache; read db.Cache.Rows("ChatMessage").

What you get

  • Connection — one session over FluxRPC/TCP: authenticate, subscribe (each query's InitialData populates a local row cache), call reducers, and receive TxUpdate diffs on the same socket. Every operation is async and takes a CancellationToken.
  • Transparent reconnect (SDK-047): on connection loss the client reconnects, re-authenticates, resubscribes every active query and reconciles its cache — the application keeps its handle across the outage.
  • A per-table row cache keyed by primary key, with per-query ownership so an UnsubscribeAsync drops only the rows that query held (SDK-044).
  • Idiomatic errors: a server failure is a FluxumException carrying the stable SPEC-028 Code (and Catalog name for an Error frame).

Typed bindings

Generate typed row records and reducer wrappers from a running server's schema (or a saved schema.json):

fluxum generate --lang csharp --schema http://127.0.0.1:15800 --out ./FluxumGen

This emits Tables.cs (a record row + <Table>Codec.Decode + the cache hook <Table>Codec.TableSchema() per table) and Reducers.cs (a static async Task <Reducer>(...) per client-callable reducer), namespace FluxumGen. Offline generation from a saved schema produces byte-identical output (SPEC-011 acceptance 11).

Testing

The SDK is validated by the shared conformance corpus (tests/conformance/) — the same declarative scenarios every Fluxum SDK runs against the same server build (TST-052). The runner boots a fresh fluxum-server per scenario, so build it first:

cargo build -p fluxum-server
cd sdks/csharp && dotnet test Fluxum.Sdk.Tests/Fluxum.Sdk.Tests.csproj
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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

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
0.2.1 30 7/27/2026
0.2.0 34 7/27/2026