Ranvier.Persistence 0.1.1

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

Ranvier.Persistence

Keyed persisted inputs for Ranvier graphs. A persisted signal or keyed collection is restored from an IStateStore loaded before the graph is built, and saved back to it after each flush that changes it. Derived nodes are not stored: they recompute from the restored inputs.

Pre-1.0 API. The package holds three stores: an in-memory store, a file store (.NET, written to a temporary file and renamed) and a localStorage store (Fable).

open Ranvier
open Ranvier.Persistence

let count = Persist.key "count" (PersistCodec.ofJournal intCodec)

task {
    let! session = Persist.loadAsync (FileStateStore "state") [ count ]
    use graph = new Graph ()
    use _active = graph.Activate ()
    let clicks = Persist.signal session count 0   // the stored value, else 0
    clicks.Value <- clicks.Value + 1               // saved after this flush
    do! session.FlushAsync ()                      // completes once the store has the write
}
  • A key is declared with its codec: a JournalCodec<'T> plus ordered migrations. loadAsync fails with a PersistLoadException naming the key on a newer stored version, a missing or failed migration, or a decode failure; PersistOptions.DiscardUndecodable uses the fallback for a decode failure instead.
  • PersistOptions.Buster discards every stored record when the stored buster differs.
  • The changes of one flush save in one SaveMany when the graph's journal is session.Journal; FlushAsync completes after every earlier save.
  • Persist.rows and Persist.document persist a keyed collection by row or as one record, in insertion order.
  • Persist.restore and Persist.track persist an Mvu model or any tracked read.
  • session.Journal records the input-journal position each save includes; a reload exposes it as session.Position.
  • Persist.sourceKey and Persist.source persist an async source's settled value or failure message.
  • Persist.replay replays the journal entries after session.Position on a restored graph, in either replay mode.

Persisted inputs belong at the root of a graph or in a keyed factory. The trace dump is not a persistence format. Guide: Persisted inputs.

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 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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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 (2)

Showing the top 2 NuGet packages that depend on Ranvier.Persistence:

Package Downloads
Ranvier.Persistence.KurrentDB

Small scoped snapshots in KurrentDB for Ranvier, with atomic batches and optional optimistic concurrency.

Ranvier.Persistence.Marten

Marten PostgreSQL state storage for Ranvier, with scoped records and optional optimistic concurrency.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.1 61 11/14/2026
0.1.1-preview.1 80 10/28/2026
0.1.0-preview.1 75 10/26/2026

Pre-1.0 release. The API may change before 1.0.