Ranvier.Traced 0.2.7

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

Ranvier

Fine-grained reactive computation for .NET and Fable.

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
open Ranvier.CE

use graph = new Graph ()

graph {
    let count = signal { return 1 }

    let doubled = memo {
        let! c = count
        return c * 2
    }

    effect {
        let! d = doubled
        printfn "doubled = %d" d
    }

    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.

Choosing the right API

1. Ergonomic Ranvier.CE builders and two-phase compilation

Open Ranvier.CE alongside Ranvier in F# for the computation-expression surface (signal, memo, memoTable, effect, bridge, dispatch, row, asyncMemo, stream, editable, draft, boundary, root, batched, untracked, cleanup, plus implicit graph { ... } and owner { ... } blocks).

Reactive builders (memo, effect, bridge, asyncMemo, stream) use two-phase static compilation: Phase-1 let! ... and! ... binds compile directly to fused static combinator nodes (SignalMap, CreateOn, EffectOn, SplitBind) in O(1) without requiring graph.Activate (), while the Phase-2 body runs untracked so helper calls cannot accidentally register stray dependencies. Direct create* functions in Ranvier.Api remain available for dynamic or higher-order wiring.

2. Read/write capability narrowing

  • SignalPort<'T> (signal.CreatePort () / Signal.createPort): write-only capability handle that coalesces off-thread Post bursts into a single 0 B steady-state inbox slot (O(1)).
  • ReadOnlySignal<'T> (signal.AsReadOnly () / Signal.readOnly): read-only capability wrapper hiding .Value <- and .Post across module boundaries. ReadOnlySignal<'T> provides no performance optimisation over Signal<'T> (in fact, it adds wrapper indirection and unwrapping cost); use it strictly to enforce read-only API contracts as a cheaper (0 B node) wrapper than an identity Memo<'T> (Signal.map id).

3. Cross-thread and cross-graph communication

  • Latest-state propagation (O(1) time, 0 B steady-state space): use signal.Post / SignalPort<'T> for raw off-thread values, or bridge target { let! x = src ... return f x } (bindSignalTo / bindMemoTo) to project reactive state across graphs with two-level input and output cutoff.
  • Ordered commands, multi-signal transactions, or results (O(queued) space): use dispatch graph { ... } (Graph.Dispatch for fire-and-forget unit work, Graph.DispatchAsync returning Task<'T> when return or cancellation is used) when every enqueued step must execute in FIFO order inside one consistency domain.

4. Keyed state, collections, and companion packages

Primitive When to use Cost profile
createSelector Single active key (selectedId = rowId) O(1) per change (wakes at most {prev, next}), O(observed keys) space, 0 unobserved retention
Lookup<'K, 'V> Open-domain push index with known affected prev next keys O(affected) per transition, O(1) cell read & auto-eviction, O(observed keys) space
MemoTable<'K, 'V> (memoTable) Large, open, or recursive pull-memoized key spaces under an LRU/weight budget O(1) amortized hit, bounded maxEntries/maxWeight, optional stamp for eviction-invariant cutoff
KeyedCollection<'K, 'V> Mutable finite keyed entity store with insertion order and change readers O(1) amortized AddOrUpdate / Remove / Get, O(N) space
Projection<'K, 'V> + row Ordered reactive views (map, mapWith, filter, sortBy, groupBy) and incremental aggregates (sumBy, countBy) O(1) lazy per-row read (0 extra nodes with row { ... }), O(log N) Fenwick/sort/tournament updates, O(1) invertible row folds
Editable<'T> (editable vs draft) Locally overridable value seeded from upstream editable drops its edit on unequal upstream seed; draft retains form edits across reloads until Reset ()

For architectural layers built on top of the core graph:

  • Ranvier.Elmish (Mvu): immutable Elmish Model/Msg loops projected through selectors and keyed row views.
  • Ranvier.Query: shared keyed remote queries, stale-while-revalidate refresh, and batched mutation reconciliation.
  • Ranvier.Dag: standalone multi-core, content-addressed incremental build/compiler task graphs without per-node UI observer tracking.

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.

For cross-thread or cross-graph signal delivery, signal.CreatePort () (SignalPort<'T>) and signal.Post value (Signal.post / SignalPort.post) coalesce off-thread bursts into a single 0 B inbox slot (writing inline and superseding queued posts on the owning thread, or dropping silently after target graph disposal). bindSignalTo, bindMemoTo, and Ranvier.CE.bridge target { ... } wire reactive sources on one graph directly into a target Signal<'T> or SignalPort<'T> with two-level input/output cutoff.

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.

Bounded memo tables and multi-core demand graphs

MemoTable<'K, 'V> (createMemoTable*, MemoTable.Create*, and memoTable { ... }) memoizes keyed reactive derivations under an entry or weight budget while keeping reactive dependency slots alive for observed keys and retaining optional 'Stamp cutoffs across payload eviction; see Memo tables.

For multi-core, content-addressed incremental build or compiler pipelines (Session, Fork/Join, firewall rules, and generational cache eviction) without per-node UI observer tracking, see standalone Ranvier.Dag.

Editable collections and change readers

open Ranvier
open Ranvier.CE

let prefix = signal { return "#" }
let items = createKeyedCollection (fun (id, _) -> id)
items.Edit(fun edit ->
    edit.AddOrUpdate(1, "write")
    edit.AddOrUpdate(2, "test"))
let titles =
    items.Rows
    |> Projection.mapWith (fun id item ->
        row {
            let! (_, text) = item
            and! p = prefix
            return $"{p}{id}: {text}"
        })
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.

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 (14)

Showing the top 5 NuGet packages that depend on Ranvier.Traced:

Package Downloads
Ranvier.View.Traced

The traced build of Ranvier.View: template components and server rendering for Ranvier. Depends on Ranvier.Traced.

Ranvier.Anime.Traced

The traced build of Ranvier.Anime, a .NET port of anime.js 4.5 for Ranvier hosts. Depends on the traced Ranvier packages.

Fable.Ranvier.Anime.Traced

The traced build of Fable.Ranvier.Anime: typed anime.js 4.5 bindings for Fable. Depends on Ranvier.Traced.

Ranvier.D5.Traced

Functional visualization foundations for F#: data, scales, geometry, layouts and reactive scenes using Ranvier signals and Anime.

Ranvier.CSharp.Traced

The traced build of Ranvier.CSharp: C# entry points for Ranvier, with the tracing queries compiled in. Depends on Ranvier.Traced.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.7 324 11/30/2026
0.2.6 177 11/29/2026
0.2.5 173 11/28/2026
0.2.4 257 11/27/2026
0.2.3 182 11/26/2026
0.2.2 190 11/25/2026
0.2.1 1,135 11/15/2026
0.2.0 2,216 11/13/2026
0.1.1-preview.3 110 11/11/2026
0.1.1-preview.2 1,578 11/7/2026
0.1.1-preview.1 1,209 10/28/2026
0.1.0-preview.7 178 10/26/2026
0.1.0-preview.6 96 10/21/2026
0.1.0-preview.5 97 10/4/2026
0.1.0-preview.4 89 10/3/2026
0.1.0-preview.3 78 9/30/2026
0.1.0-preview.2 90 9/30/2026
0.1.0-preview.1 86 9/29/2026

See https://ranvier-org.github.io/Ranvier/ for documentation and release notes.