LadybugDB 0.19.1
dotnet add package LadybugDB --version 0.19.1
NuGet\Install-Package LadybugDB -Version 0.19.1
<PackageReference Include="LadybugDB" Version="0.19.1" />
<PackageVersion Include="LadybugDB" Version="0.19.1" />
<PackageReference Include="LadybugDB" />
paket add LadybugDB --version 0.19.1
#r "nuget: LadybugDB, 0.19.1"
#:package LadybugDB@0.19.1
#addin nuget:?package=LadybugDB&version=0.19.1
#tool nuget:?package=LadybugDB&version=0.19.1
LadybugDB for .NET
Official C# binding for the Ladybug embedded graph database. It wraps the native Ladybug C API via P/Invoke and ships prebuilt native libraries for supported platforms, so you can run Cypher queries against an embedded graph database directly from .NET.
Current package family:
0.19.1, built against the Ladybugv0.19.1engine.
Target frameworks
net10.0(primary, AOT/trim friendly, source-generatedLibraryImport)netstandard2.0(broad reach, including .NET Framework)
Installation
The binding is split into a managed package and separate native packages, so an app only carries the platform binaries it needs. Reference the managed package plus a native package.
For an app that should run on any supported platform, add the native meta-package (it pulls in every per-platform native package):
dotnet add package LadybugDB
dotnet add package LadybugDB.Native
For a slim, single-platform app, reference just the native package for that platform instead of the meta-package:
dotnet add package LadybugDB
dotnet add package LadybugDB.Native.win-x64
Available native packages: LadybugDB.Native.win-x64, LadybugDB.Native.linux-x64,
LadybugDB.Native.linux-arm64, LadybugDB.Native.osx-x64, LadybugDB.Native.osx-arm64. The
LadybugDB.Native meta-package depends on all of them.
Quick start
using LadybugDB;
using var db = new Database("./demo.db");
using var conn = new Connection(db);
conn.Query("CREATE NODE TABLE Person(name STRING, age INT64, PRIMARY KEY(name))").Dispose();
conn.Query("CREATE (:Person {name: 'Alice', age: 30})").Dispose();
using var result = conn.Query("MATCH (p:Person) RETURN p.name, p.age");
foreach (var row in result.Rows())
{
Console.WriteLine($"{row[0]} is {row[1]} years old");
}
Inspecting pushed-down SQL
Connection.GetPushedSql(cypher) prepares and optimizes a query, then returns the SQL emitted by a
pushdown-capable table function. It returns null when the optimized plan contains no pushed-down SQL
and throws LadybugQueryException with the native diagnostic when the query cannot be analyzed.
Building / testing
dotnet build LadybugDB.slnx -c Release
dotnet test LadybugDB.slnx -c Release
The binding needs the native Ladybug shared library at runtime (lbug_shared.dll /
liblbug.so / liblbug.dylib). When the native library is not available, the native round-trip
tests skip (the ABI/struct-layout guards still run).
How the packages are built
This repo does not contain the engine source; the native libraries come from the upstream
Ladybug engine. Packaging is driven by a Cake Frosting build
project under cake/ (run it with the build.ps1 / build.sh bootstrap):
./build.sh --target Test # build + stage the host native + run the suite
./build.sh --target Pack # build the full package family into ./artifacts
All packages in the family share one version. The first three numeric segments track the upstream engine
release, and the optional fourth segment is the .NET package revision for binding-only releases. For
example, package 0.19.1 wraps the Ladybug v0.19.1 engine; a future binding-only fix over the same
engine would be 0.19.1.1. Prerelease suffixes are reserved for preview builds.
The package version is defined once in version.txt at the repo root. Override it with
--package-version <v> (the release workflow uses the git tag). The engine release defaults to the first
three numeric package-version segments; override with --engine-version when needed.
Packstages the prebuiltliblbug-*assets for every shipped RID (downloaded from an upstreamLadybugDB/ladybugGitHub Release, pinned to the engine version derived fromversion.txt; override with--engine-version), packs the managedLadybugDBpackage, oneLadybugDB.Native.<rid>package per RID, and theLadybugDB.Nativemeta-package, then verifies every package's contents.- CI / release (
.github/workflows/) invoke the same pipeline; the release workflow gates on the linux-x64 suite against the real engine and publishes all packages to nuget.org via OIDC. - Local development is easiest when this repo is checked out as the
tools/csharp_apisubmodule inside the Ladybug monorepo:scripts/build-native-and-test.ps1buildslbug_sharedfrom the parent engine tree, stages it intolib/runtimes/win-x64/native/, and runs the suite. With a native already staged there,--target Testreuses it instead of downloading.
| Product | Versions 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
-
net10.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LadybugDB:
| Package | Downloads |
|---|---|
|
Penghou.Hetu.Ladybug
Durable embedded LadybugDB graph store provider for Penghou.Hetu. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.19.1 | 297 | 8/18/2026 |
| 0.18.2 | 133 | 7/15/2026 |
| 0.17.0-alpha.1 | 95 | 5/31/2026 |