TursoSync.Dapper 0.1.0

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

TursoSync

CI NuGet License: MIT

A drop-in ADO.NET provider for Turso (namespace Turso) with local↔cloud sync and tantivy full-text search — the pieces the official Turso.Data binding doesn't ship yet. Same API surface, so existing Turso.Data code compiles unchanged; the sync engine is the add-on.

using Turso;

// Local-only (offline fast path — plain engine, no sync overhead)
await using var conn = new TursoConnection("Data Source=app.db");
await conn.OpenAsync();

// …or synced against Turso Cloud
await using var synced = new TursoConnection(
    "Data Source=app.db;Remote Url=libsql://my-db.turso.io;Auth Token=…");
await synced.OpenAsync();
synced.SyncDatabase!.Push();   // push local changes
synced.SyncDatabase!.Pull();   // pull + apply remote changes

Packages

Package What
TursoSync The ADO.NET provider (namespace Turso): connection/command/reader/parameter/transaction, TursoFactory, sync engine, UDFs, aggregates, collations, load-extension, local at-rest encryption, connection pooling.
TursoSync.DbUp DbUp database provider — DeployChanges.To.TursoDatabase(connectionString).
TursoSync.Dapper Dapper type handlers that round-trip Ulid, DateTimeOffset and Guid as portable TEXT.
dotnet add package TursoSync
dotnet add package TursoSync.DbUp     # optional: migrations
dotnet add package TursoSync.Dapper   # optional: Dapper type handlers

Highlights

  • Two lanes, one API. No Remote Url → the plain local engine (AsyncIO=0, no IO pump); a remote (or Sync=true) → the sync engine. In release builds, local performance is on par with SQLite.
  • Drop-in. Public types live in namespace Turso (TursoConnection, TursoCommand, …) and work with Dapper, DbUp and the DbProviderFactory pattern.
  • Connection pooling on by default (Pooling=false to disable) — opening Turso is expensive, the pool makes the open-per-op pattern ~50× cheaper.
  • Extensibility: CreateFunction / CreateAggregate / CreateCollation / EnableExtensions / LoadExtension.
  • Local at-rest encryption: …;Encryption Cipher=aes256gcm;Encryption Key=<hex>.

Connection string keys

Data Source (required) · Remote Url · Auth Token · Namespace · Bootstrap · Sync · Pooling · Busy Timeout · Long Poll Timeout · Encryption Cipher · Encryption Key.

Native library

The provider P/Invokes the turso_sync_sdk_kit native (the Turso sync engine + tantivy FTS). Released packages carry it under runtimes/<rid>/native/. For local development against a self-built engine, point TURSOSYNC_NATIVE_DIR at the folder containing the built turso_sync_sdk_kit library. Build the native in release — debug builds are ~25× slower.

Engine version

The Turso engine (the turso_sync_sdk_kit native) is not vendored — CI builds it from tursodatabase/turso at the commit pinned in turso-engine.json. The C ABI is beta, so the pin keeps builds reproducible.

  • Bump it with scripts/bump-turso.sh <tag|latest> (resolves the tag → commit SHA).
  • A weekly Engine bump workflow opens a PR when a newer release appears in the pinned series; CI builds
    • tests against it on the PR, so an ABI change is caught in review before merge.

Examples

// Migrations (TursoSync.DbUp)
using DbUp;
var result = DeployChanges.To.TursoDatabase("Data Source=app.db")
    .WithScriptsEmbeddedInAssembly(typeof(Program).Assembly)
    .Build()
    .PerformUpgrade();

// Dapper type handlers (TursoSync.Dapper)
Turso.TursoTypeHandlers.Register();

// A scalar UDF
conn.CreateFunction("times_two", 1, args => Convert.ToInt64(args[0]) * 2);

Status

Feature-complete relative to the official Turso.Data + Turso.Raw surface (see TURSO-PARITY.md), plus the sync layer. The underlying Turso engine is beta; one known gap is sync-lane at-rest encryption (base-lane encryption is supported).

Releasing

Releases are driven by shipRig (changesets) — config in .changeset/.

  1. Record intent: shiprig add (pick the bump + summary; the three packages are fixed, so they version together; TursoSync.Tests is ignored).
  2. Ship: shiprig release → versions + changelog → commit → tags TursoSync@x.y.z → push.

The pushed tag triggers the Release workflow, which builds all six RID natives (release + FTS, stripped), packs, and publishes to NuGet via trusted publishing (OIDC — no API key). shipRig only versions/tags/pushes; the cross-arch native build + publish stay in CI (.changeset/release.jsonc).

Day-to-day dev uses rig (.rig.json): rig build / rig test / rig coverage, plus rig engine <tag|latest> (pin the engine) and rig pack (local Tier-0 pack + consume test).

License

MIT.

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 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.0 95 6/18/2026
0.1.0-preview.1 249 6/17/2026