ferrule-sql 0.1.0-alpha

Embeddable, synchronous, bounded-memory SQL core: neutral Value/Row types, a database-URL parser, and feature-gated Postgres/MySQL/MSSQL/SQLite/Oracle drivers with streaming cursors and a batched cross-backend copy path.
Documentation
[package]
name = "ferrule-sql"
# ferrule-sql versions independently of the rest of the workspace (which is
# at 0.1.0): the first external release ships as a `0.1.0-alpha` pre-release
# while the embeddable API settles. Version is a per-crate setting, so this
# does not move the CLI/core crates. Pre-releases sort below 0.1.0, so a
# later `0.1.0` is a clean upgrade for embedders.
version = "0.1.0-alpha"
# ferrule-sql tracks edition 2024 / MSRV 1.91 independently of the rest of
# the workspace (still edition 2021): it is the crate published for external
# embedders, who expect the current edition and a recent-but-not-bleeding-edge
# MSRV. Edition is a per-crate setting, so this does not force the CLI/core
# crates forward.
edition = "2024"
rust-version = "1.91"
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "Embeddable, synchronous, bounded-memory SQL core: neutral Value/Row types, a database-URL parser, and feature-gated Postgres/MySQL/MSSQL/SQLite/Oracle drivers with streaming cursors and a batched cross-backend copy path."
documentation = "https://docs.rs/ferrule-sql"
readme = "README.md"
keywords = ["sql", "database", "postgres", "mysql", "embeddable"]
categories = ["database", "api-bindings"]

# docs.rs builds with the default (empty) feature set, which hides every
# backend. Build all backends there so the rendered docs match what an
# embedder sees with the features they enable. Oracle compiles without the
# Instant Client (ODPI-C's C shim is built from vendored source; only a
# runtime connection dlopen's libclntsh), so all-features is safe here.
[package.metadata.docs.rs]
all-features = true

[features]
default = []
postgres = ["dep:tokio-postgres","dep:tokio-postgres-rustls","dep:tokio-rustls","dep:webpki-roots","dep:uuid","dep:rust_decimal","dep:rustls","dep:bytes"]
mysql = ["dep:mysql_async","dep:bytes"]
mssql = ["dep:tiberius","dep:tokio-util"]
sqlite = ["dep:rusqlite"]
oracle = ["dep:oracle"]
ssh = ["dep:russh","dep:pkcs5"]

[dependencies]
tokio = { workspace = true, features = ["sync"] }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
chrono = { workspace = true }
indexmap = { workspace = true }
url = { workspace = true }
secrecy = { workspace = true }
async-trait = "0.1"
base64 = { workspace = true }
hex = "0.4"
rust_decimal = { version = "1", optional = true, features = ["db-tokio-postgres"] }
tokio-postgres = { version = "0.7", optional = true, features = ["with-serde_json-1","with-chrono-0_4","with-uuid-1"] }
# tokio-postgres-rustls 0.13 already pins rustls to the ring provider internally
# (its rustls dep is default-features=false + features=["ring",...]), so it pulls
# no aws-lc-rs of its own.
tokio-postgres-rustls = { version = "0.13", optional = true }
# rustls/tokio-rustls default to the aws_lc_rs provider, which drags in the
# cc/cmake-built aws-lc-sys. Pin them to the pure-Rust `ring` provider so the
# Postgres TLS path stays inside the #67 C-free vendored-static floor (ring only).
tokio-rustls = { version = "0.26", optional = true, default-features = false, features = ["ring","logging","tls12"] }
rustls = { version = "0.23", optional = true, default-features = false, features = ["ring","logging","std","tls12"] }
webpki-roots = { version = "0.26", optional = true }
uuid = { workspace = true, optional = true }
bytes = { version = "1", optional = true }
futures-util = { version = "0.3", default-features = false, features = ["sink","alloc"] }
# default-rustls-ring selects flate2's pure-Rust backend (drops libz-sys) and the
# ring rustls provider (drops aws-lc-sys); default-features=false suppresses
# mysql_async's own `default`, which would re-enable the aws-lc-rs provider.
mysql_async = { version = "0.35", optional = true, default-features = false, features = ["default-rustls-ring","chrono"] }
tiberius = { version = "0.12", optional = true, features = ["chrono"] }
tokio-util = { version = "0.7", features = ["compat"], optional = true }
rusqlite = { version = "0.32", features = ["bundled","chrono","serde_json"], optional = true }
oracle = { version = "0.6", optional = true, features = ["chrono"] }
# russh defaults to the aws-lc-rs crypto provider; pin it to ring so the SSH
# tunnel transport carries no aws-lc-sys. flate2 (resolves to pure-Rust
# miniz_oxide here) and rsa preserve the compression + RSA key-auth behaviour
# of russh's default feature set.
russh = { version = "0.60", optional = true, default-features = false, features = ["ring","flate2","rsa"] }
pkcs5 = { version = "=0.8.0-rc.13", optional = true }