Ranvier 0.2.2
dotnet add package Ranvier --version 0.2.2
NuGet\Install-Package Ranvier -Version 0.2.2
<PackageReference Include="Ranvier" Version="0.2.2" />
<PackageVersion Include="Ranvier" Version="0.2.2" />
<PackageReference Include="Ranvier" />
paket add Ranvier --version 0.2.2
#r "nuget: Ranvier, 0.2.2"
#:package Ranvier@0.2.2
#addin nuget:?package=Ranvier&version=0.2.2
#tool nuget:?package=Ranvier&version=0.2.2
Ranvier
Fine-grained reactive computation for .NET and Fable.
Preview. Ranvier is pre-release. Its APIs may change before the first release.
Ranvier connects signals, memos and effects in a reactive graph. Signals hold writable state; memos derive values and recompute on demand after their inputs change; effects run side effects after changes. Async sources carry an explicit Pending state, and boundaries handle pending or failed reads.
open Ranvier
use graph = new Graph ()
graph.Run (fun () ->
let count = createSignal 1
let doubled = createMemo (fun _ -> count.Value * 2)
createEffect (fun () -> printfn "doubled = %d" doubled.Value)
count.Value <- 5)
C# projects reference Ranvier.CSharp, which adds delegate-based factories and extension methods.
Targets
net10.0 and netstandard2.1. Applications on .NET 8 and .NET 9 use the netstandard2.1 build.
Package builds from this source include F# sources for Fable's JavaScript target. The same core APIs support signals, memos, effects, bindings and collections on both targets; see the Fable guide.
Fixed-dependency bindings and ownership
bindSignal source target write and bindMemo source target write copy one source into an
external target in the flush. The writer receives the target and current value, runs untracked
and must not create reactive nodes. A pending or failed memo leaves the target unchanged;
an equal source value does not write again. Both factories return unit and attach to the current owner.
Use a memo before bindMemo to derive a target value, or an effect for work with dynamic dependencies.
Owners dispose children and cleanups together in reverse acquisition order. A cleanup registered after a child is created runs before that child is disposed, both on disposal and before a run's owned resources are replaced. See Bindings and Cleanup.
Keyed row factories
createProjectionWithOptions ProjectionOptions.CreateFirst keyOf factory source creates added
rows before retiring removed rows. If a new factory throws, the pass disposes its additions and
keeps the previously applied rows, items and keys until a source change retries the pass.
createProjectionOnce options keyOf factory source stores one factory result per key without a
row memo. It suits a view object whose factory creates its own bindings. Keys, Count, Contains,
Get, TryGet, NewKeyReader, length, isEmpty, and positional readers (tryHead, tryLast,
tryItem, head, last, item) are supported; AsObservableCollection, NewValueReader, all
Projection view operators (filter, choose, map, mapWith, sortBy, sortByDescending,
take, skip, sub, partition, distinctBy, groupBy), and fold/search/extreme aggregates
raise NotSupportedException. Use createProjectionWith when consumers need reactive row values.
See Projections.
Per-node equality
Ordinary factories use GraphOptions.Equality. Override a node's value cutoff with a typed IEqualityComparer<T>
via createSignalWithComparer, createMemoWithComparer, createOwningMemoWithComparer,
createEffectOnWithComparer, createSuspenseWithComparer, createErrorBoundaryWithComparer, and
createBoundaryWithComparer (or the C# Reactive comparer overloads). Pending, failed, waiting, and
caught-error transitions still propagate; see Per-node equality.
Editable collections and change readers
let items = createKeyedCollection (fun (id, _) -> id)
items.Edit(fun edit ->
edit.AddOrUpdate(1, "write")
edit.AddOrUpdate(2, "test"))
let titles = items.Rows |> Projection.map snd
use reader = titles.NewValueReader ()
reader.Read () |> ignore // initial reset
items.AddOrUpdate(2, "retest")
let delta = reader.Read () // Changed for key 2
Reactive.KeyedCollection<T, K>(keyOf) is the C# factory. Rows supports the existing
map/filter/sort/group/aggregate operators. Updating a live key writes its value directly, preserving
key order without scanning the collection. New keys append; Remove unlinks in O(1) via an
intrusive doubly-linked list, and net-empty append/remove batches reuse the prior key array.
Removing and re-adding a key creates a new row, reported as Replaced to a reader that saw the old row.
Edit batches synchronous writes and retains applied edits if its callback throws.
NewKeyReader() reports membership and order; NewValueReader() also reports Changed for unequal
settled values. See Collections and
Collection views for reader cursors,
observation lifetime, and incremental view costs.
Tracing
Ranvier.Traced is the same assembly, namespaces and version built with the per-graph event log and its queries.
Reference it in place of Ranvier for development builds; see
Tracing.
Links
| Product | Versions 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. |
-
.NETStandard 2.1
- Fable.Core (>= 5.3.0)
- FSharp.Core (>= 8.0.100)
-
net10.0
- Fable.Core (>= 5.3.0)
- FSharp.Core (>= 8.0.100)
NuGet packages (13)
Showing the top 5 NuGet packages that depend on Ranvier:
| Package | Downloads |
|---|---|
|
Ranvier.View
Template components for Ranvier: typed templates, view sugar, keyed lists, arms and boundaries, with server HTML rendering on .NET and under Fable. |
|
|
Ranvier.Elmish
An Elmish-style model-view-update bridge for Ranvier: a model held in a signal, updated by dispatched messages and read through selector memos. |
|
|
Fable.Ranvier.Anime
Typed anime.js 4.5 bindings for Fable, with Ranvier integration: parameters as constructors with named optional arguments, and per-feature imports. |
|
|
Ranvier.Anime
A .NET port of anime.js 4.5 for Ranvier hosts: timers, timelines, keyframes, typed CSS, layout, scroll, drag, SVG and text animation on a frame scheduler, with the API shared with Fable.Ranvier.Anime. |
|
|
Ranvier.FSharp.Checker
Demand-driven, declaration-incremental F# type-checking graph powered by Ranvier, with zero compiler-object retention at rest and live in-memory cross-project propagation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.2 | 0 | 11/25/2026 |
| 0.2.1 | 777 | 11/15/2026 |
| 0.2.0 | 3,611 | 11/13/2026 |
| 0.1.1-preview.3 | 299 | 11/11/2026 |
| 0.1.1-preview.2 | 3,442 | 11/7/2026 |
| 0.1.1-preview.1 | 5,371 | 10/28/2026 |
| 0.1.0-preview.7 | 182 | 10/26/2026 |
| 0.1.0-preview.6 | 98 | 10/21/2026 |
| 0.1.0-preview.5 | 96 | 10/4/2026 |
| 0.1.0-preview.4 | 86 | 10/3/2026 |
| 0.1.0-preview.3 | 78 | 9/30/2026 |
| 0.1.0-preview.2 | 78 | 9/30/2026 |
| 0.1.0-preview.1 | 79 | 9/29/2026 |
Pre-1.0 release. The API may change before 1.0.