Timslite 0.1.7
dotnet add package Timslite --version 0.1.7
NuGet\Install-Package Timslite -Version 0.1.7
<PackageReference Include="Timslite" Version="0.1.7" />
<PackageVersion Include="Timslite" Version="0.1.7" />
<PackageReference Include="Timslite" />
paket add Timslite --version 0.1.7
#r "nuget: Timslite, 0.1.7"
#:package Timslite@0.1.7
#addin nuget:?package=Timslite&version=0.1.7
#tool nuget:?package=Timslite&version=0.1.7
Timslite .NET
.NET bindings for the timslite time-series storage engine, built with UniFFI.
Installation
dotnet add package Timslite
Quick Start
using Timslite;
// Open or create a store.
using var store = Store.Open("/path/to/data");
// Create a dataset.
var config = new DatasetConfig();
store.CreateDataset("metrics", "gauge", config);
// Write a record.
var ds = store.OpenDataset("metrics", "gauge");
ds.Write(1700000000, new byte[] { 0x01, 0x02 });
// Read it back.
var record = ds.Read(1700000000);
Console.WriteLine($"Timestamp: {record.Timestamp}, Length: {record.Data.Length}");
// Query a range.
foreach (var r in ds.Query(1700000000, 1700000060))
{
Console.WriteLine($"{r.Timestamp}: {r.Data.Length} bytes");
}
// Get the library version.
Console.WriteLine($"timslite {TimsliteInfo.Version()}");
Queue Example
using Timslite;
using var store = Store.Open("/path/to/data");
var config = new DatasetConfig();
store.CreateDataset("events", "log", config);
var ds = store.OpenDataset("events", "log");
var queue = ds.OpenQueue();
// Push a message.
queue.Push(1700000000, new byte[] { 0x01 });
// Open a consumer and poll.
using var consumer = queue.OpenConsumer("my-group");
var entry = consumer.Poll();
if (entry != null)
{
Console.WriteLine($"Polled: {entry.Timestamp}");
consumer.Ack(entry.Timestamp);
}
Journal Example
using Timslite;
// Open store with journal enabled.
var storeConfig = new StoreConfig { EnableJournal = true };
using var store = Store.Open("/path/to/data", storeConfig);
// Read journal entries.
var journalQueue = store.OpenJournalQueue();
using var consumer = journalQueue.OpenConsumer("replay");
var entry = consumer.Poll();
if (entry != null)
{
Console.WriteLine($"Journal seq: {entry.Timestamp}");
consumer.Ack(entry.Timestamp);
}
Requirements
- .NET 8.0 or later (
net8.0). - Supported package platforms: Windows (x64/arm64), Linux glibc (x64/arm64), Linux musl (x64/arm64), macOS (arm64).
Native Library Loading
The package includes pre-built native libraries for all supported platforms. The loader resolves them automatically from the NuGet restore output layout.
Override
Set TIMSLITE_NATIVE_LIBRARY_PATH to point directly to a native library binary:
export TIMSLITE_NATIVE_LIBRARY_PATH=/opt/timslite/libtimslite_dotnet.so
Supported Platforms
| RID | Library |
|---|---|
win-x64 |
timslite_dotnet.dll |
win-arm64 |
timslite_dotnet.dll |
linux-x64 |
libtimslite_dotnet.so |
linux-arm64 |
libtimslite_dotnet.so |
linux-musl-x64 |
libtimslite_dotnet.so |
linux-musl-arm64 |
libtimslite_dotnet.so |
osx-arm64 |
libtimslite_dotnet.dylib |
Unsupported Platforms
The following platforms are not supported in the current release. Attempting to load the native library on an unsupported RID will throw a clear error at runtime.
- macOS x64 (
osx-x64) - not built by the default NuGet release workflow. - NativeAOT - pre-compiled native trimming is not yet validated.
- FreeBSD, Android, iOS, wasm - no native binaries are shipped.
If you need support for one of these platforms, please open an issue.
Building from Source
# Build the native library for the current platform.
cargo build --manifest-path wrapper/dotnet/native/Cargo.toml
# Copy the native binary into the runtimes layout.
bash wrapper/dotnet/scripts/prepare-publish.sh
# Build and test the .NET wrapper.
dotnet build wrapper/dotnet/Timslite.slnx
dotnet test wrapper/dotnet/Timslite.slnx
License
MIT
| Product | Versions 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. |
-
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.