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.
IDisposableandIAsyncDisposableon every handle, withusingdeclarations throughout.IAsyncEnumerable<Row>as the default result iteration, with[EnumeratorCancellation]so aCancellationTokenactually interrupts the query.- Nullable reference types on,
Span<T>andReadOnlySpan<T>at the boundaries,System.Text.Jsonsource 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.
Spec/2064g/dx/10-dotnet.md in tamnd/zu. Milestone: DX5 (tamnd/zu#171).
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.
| 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.
Apache-2.0, same as the engine.