[package]
name = "diesel-libsql"
version = "0.1.1"
edition = "2021"
license = "MIT"
description = "Diesel ORM backend for libSQL (Turso) — local, remote, replicas, async, OpenTelemetry"
repository = "https://github.com/yackey-labs/diesel-libsql"
readme = "README.md"
keywords = ["diesel", "libsql", "turso", "sqlite", "orm"]
categories = ["database"]

[dependencies]
diesel = { version = "2.3", features = ["i-implement-a-third-party-backend-and-opt-into-breaking-changes", "sqlite"] }
libsql = "0.9"
tokio = { version = "1", features = ["rt-multi-thread"] }
r2d2 = { version = "0.8", optional = true }
diesel-async = { version = "0.8", optional = true }
futures-util = { version = "0.3", optional = true }
opentelemetry = { version = "0.29", optional = true }

# We need bundled sqlite3 for diesel's sqlite feature (type metadata only)
[dependencies.libsqlite3-sys]
version = ">=0.17.2, <0.37.0"
features = ["bundled"]

[features]
default = []
r2d2 = ["dep:r2d2"]
async = ["dep:diesel-async", "dep:futures-util"]
deadpool = ["async", "diesel-async/deadpool"]
bb8 = ["async", "diesel-async/bb8"]
otel = ["dep:opentelemetry"]
encryption = ["libsql/encryption"]

[dev-dependencies]
tempfile = "3"
diesel_migrations = "2.3"
r2d2 = "0.8"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
