reddb-client
Official Rust client for RedDB.
One connection-string API across embedded, gRPC, HTTP, and
RedWire transports. Also hosts the red_client binary and the
workspace-internal connector used by red's REPL and
reddb-server's rpc_stdio mode.
Quickstart (library)
[]
= "0.2"
use ;
# async
Cargo features
embedded(default) — pulls the engine in-process formemory:///file:///URIs.grpc— async tonic client forgrpc:///red://.http— REST client over reqwest+rustls forhttp:///https://.redwire— native RedWire TCP client (no engine).redwire-tls— adds TLS / mTLS to the RedWire transport.
Disable defaults to drop the engine: default-features = false.
red_client binary
The crate also hosts the red_client binary (built with
cargo build -p reddb-io-client --bin red_client --no-default-features).
It is the thin remote-only client used by ops tooling — no
engine, no embedded backend, just transports:
| Scheme | Status |
|---|---|
red://host[:port] |
gRPC, default port 5050 |
reds://host[:port] |
TODO (TLS not yet wired in the bin) |
grpc://host[:port] |
gRPC, default port 5055 |
http://host[:port] |
REST |
memory: / file:// |
rejected (exit 2, points to red) |
red_client is guarded by SIZE_BUDGET (stripped
release bytes); CI runs ./scripts/check-red-client-size.sh on
every PR to catch accidental engine re-linkage.
Module layout
crate::Reddb/JsonValue/ClientError— published high-level API.crate::connect::{Target, parse}— back-compat shim overreddb-wire's connection-string parser.crate::connector::{RedDBClient, repl, http, redwire}— workspace-internal connector consumed by theredREPL,red_clientbin, andreddb-server's rpc_stdio mode. The gRPC connector type itself lives in thereddb-client-connectorsibling crate to break a path-dependency cycle.