Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zu for .NET

The .NET client for zu, an embedded property-graph database.

using ZuDb;

using var db = ZuDatabase.Open("social.zu1");
using var conn = db.Connect();

conn.Execute("CREATE NODE TABLE Person(id INT64 PRIMARY KEY, name STRING)");
conn.LoadCsv("Person", "people.csv");

await foreach (var row in conn.QueryAsync("""
    MATCH (p:Person)-[:Follows]->(f)
    RETURN p.name AS name, count(*) AS n ORDER BY n DESC LIMIT 5
    """))
{
    Console.WriteLine($"{row.GetString("name")}: {row.GetInt64("n")}");
}
dotnet add package ZuDb

Tier 2. Bound with source-generated P/Invoke ([LibraryImport]) over libzu, targeting .NET 10 LTS, fully NativeAOT- and trimming-compatible. No C++/CLI, no hand-written marshalling, no DllImport with runtime marshalling, because all three are AOT-hostile and AOT compatibility is what decides whether a .NET library is usable in the deployment targets people have now.

.NET 8 LTS goes out of support in November 2026 and is not a target.

What you get

  • IDisposable and IAsyncDisposable on every handle, with using declarations throughout.
  • IAsyncEnumerable<Row> as the default result iteration, with [EnumeratorCancellation] so a CancellationToken actually interrupts the query.
  • Nullable reference types on, Span<T> and ReadOnlySpan<T> at the boundaries, System.Text.Json source generators for the parts that serialize.
  • An ADO.NET layer in a separate subpackage for shops standardized on DbConnection, with its limits stated rather than hidden.

Specification

Spec/2064g/dx/10-dotnet.md in tamnd/zu. Milestone: DX5 (tamnd/zu#171).

Status

Pre-1.0 and pre-release. Nothing is published yet. The engine, the C ABI, and this client all move on one version number, so a release here always pairs with the same release of tamnd/zu.

Where things live

What Where
Engine, Rust SDK, CLI, zu.h, conformance corpus tamnd/zu
Documentation and website tamnd/zu-web
This client here

If a bug reproduces through the zu CLI, it belongs in tamnd/zu, not here.

License

Apache-2.0, same as the engine.

About

ZuDb on NuGet: the .NET client for zu, source-generated P/Invoke and NativeAOT-clean

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors