Wickra.TimeMachine 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Wickra.TimeMachine --version 0.1.0
                    
NuGet\Install-Package Wickra.TimeMachine -Version 0.1.0
                    
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="Wickra.TimeMachine" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wickra.TimeMachine" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Wickra.TimeMachine" />
                    
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 Wickra.TimeMachine --version 0.1.0
                    
#r "nuget: Wickra.TimeMachine, 0.1.0"
                    
#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 Wickra.TimeMachine@0.1.0
                    
#: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=Wickra.TimeMachine&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Wickra.TimeMachine&version=0.1.0
                    
Install as a Cake Tool

Wickra TimeMachine — C#

.NET bindings for the Wickra Time Machine over its C ABI hub. A TimeMachine is built from a spec JSON and driven over a JSON boundary, so seeking to a timestamp reconstructs the byte-identical market snapshot as every other Wickra Time Machine binding.

Install

dotnet add package Wickra.TimeMachine

The package ships the native C ABI library per runtime identifier under runtimes/<rid>/native/. For a local build, cargo build -p wickra-timemachine-c --release places the library in target/release/; the bundled DllImportResolver probes the Cargo target/ tree, so tests and apps in the repo find it without extra steps.

Usage

using System.Text.Json;
using Wickra.TimeMachine;

const string feed =
    """{"ts":10,"symbol":"BTC-USDT","feed":{"kind":"market","type":"trade","symbol":{"base":"BTC","quote":"USDT"},"price":"100","quantity":"1","aggressor":"Buy","timestamp":10}}""" + "\n" +
    """{"ts":20,"symbol":"BTC-USDT","feed":{"kind":"market","type":"trade","symbol":{"base":"BTC","quote":"USDT"},"price":"110","quantity":"2","aggressor":"Sell","timestamp":20}}""";

using var tm = new TimeMachine("{}");
tm.Command($$"""{"cmd":"load","data":{{JsonSerializer.Serialize(feed)}}}""");
string snapshot = tm.Command("""{"cmd":"seek","ts":20}""");
Console.WriteLine(snapshot); // the market snapshot reconstructed at ts=20

Surface

  • new TimeMachine(specJson) — build a time-machine handle ("{}" uses the default spec). Throws ArgumentException on an invalid spec.
  • Command(cmdJson) — apply a command envelope ({"cmd":"...", ...}) and return the response JSON. Commands: load, seek, state_at, play, version.
  • TimeMachine.Version() — the library version.
  • Dispose() — free the native handle (using recommended).

Determinism

The re-fold lives only in the Rust core; this binding forwards the command string verbatim, so seeking to a given timestamp produces the byte-identical snapshot here and in every other binding — the exact cross-language golden invariant.

See also

License

Dual-licensed under either MIT or Apache-2.0, at your option.

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.1.5 102 9/27/2026
0.1.4 90 9/24/2026
0.1.3 99 9/23/2026
0.1.2 101 9/18/2026
0.1.1 96 9/14/2026
0.1.0 109 9/14/2026