hyperdb-api 0.4.0

Pure Rust API for Hyper database
Documentation
[package]
name = "hyperdb-api"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
description = "Pure Rust API for Hyper database"
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
keywords = ["database", "hyper", "postgres", "arrow"]
categories = ["database"]
autobenches = false

[dependencies]
# x-release-please-start-version
hyperdb-api-core = { path = "../hyperdb-api-core", version = "=0.4.0" }
# x-release-please-end
# NOTE: hyperdb-api-derive is intentionally NOT a dep of hyperdb-api.
# Adding it creates a cycle:
#   hyperdb-api → hyperdb-api-derive → hyperdb-compile-check → hyperdb-api
# proc-macro re-exports (FromRow, Table, query_as!) are gone from hyperdb-api;
# users add hyperdb-api-derive directly.
bytes = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
# Arrow for result parsing (used by both TCP and gRPC transports)
arrow = { version = "58", default-features = false, features = ["ipc"] }
# SmallVec for memory-efficient collections that are typically small
smallvec = "1.15"
# Deadpool - async connection pool
deadpool = { version = "0.13" }
# tokio sync primitives — already present transitively via hyperdb-api-core's
# async TCP client; declared here for the pool's first-connection mutex.
tokio = { workspace = true, features = ["sync"] }
# async-stream's try_stream! powers AsyncConnection::stream_as, letting us
# await next_chunk() inside a natural loop and surface the submit error as
# the stream's first item.
async-stream = "0.3"
# futures-core provides the Stream trait used in stream_as's return type.
# Already present transitively; pinned here as a direct dep for the public API.
futures-core = "0.3"
# Serde JSON - for query stats log parsing
serde = { workspace = true }
serde_json = { workspace = true }

[lints]
workspace = true

[dev-dependencies]
# path-only: no version pin so cargo doesn't try to resolve hyperdb-api-derive
# against crates.io during `cargo publish` (that would create a circular
# publish dependency since hyperdb-api-derive dev-depends on hyperdb-api).
hyperdb-api-derive = { path = "../hyperdb-api-derive" }
tempfile = { workspace = true }
libc = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio = { version = "1", features = ["full"] }
# StreamExt/TryStreamExt for draining stream_as in async tests
futures = "0.3"
rand = { workspace = true }
serde = { workspace = true }
sysinfo = { workspace = true }

# B4 compile-time validation end-to-end integration tests
[[test]]
name = "compile_time_validation_tests"
path = "tests/compile_time_validation_tests.rs"
harness = true

# Stress test integration test
[[test]]
name = "stress_test"
path = "tests/stress_test_main.rs"
harness = true

# Additional examples (in additional_examples/ subdirectory)

[[example]]
name = "row_mapping_forms"
path = "examples/additional_examples/row_mapping_forms.rs"

[[example]]
name = "compile_time_validation"
path = "examples/additional_examples/compile_time_validation.rs"

[[example]]
name = "async_usage"
path = "examples/additional_examples/async_usage.rs"

[[example]]
name = "threaded_inserter"
path = "examples/additional_examples/threaded_inserter.rs"

[[example]]
name = "arrow"
path = "examples/additional_examples/arrow.rs"

[[example]]
name = "grpc_query"
path = "examples/additional_examples/grpc_query.rs"

[[example]]
name = "connection_pool"
path = "examples/additional_examples/connection_pool.rs"

[[example]]
name = "transactions"
path = "examples/additional_examples/transactions.rs"

# Benchmarks (in benches/ subdirectory - registered as examples for easy `cargo run`)
[[example]]
name = "benchmark"
path = "benches/benchmark.rs"

[[example]]
name = "arrow_batching_benchmark"
path = "benches/arrow_batching_benchmark.rs"

[[example]]
name = "grpc_benchmark_tests"
path = "benches/grpc_benchmark_tests.rs"

[[example]]
name = "async_parallel_benchmark"
path = "benches/async_parallel_benchmark.rs"

[[example]]
name = "benchmark_suite"
path = "benches/benchmark_suite.rs"