Skip to content

feat: ember-client — native async RESP3 client library - #297

Merged
kacy merged 1 commit into
mainfrom
feat/ember-client
Feb 25, 2026
Merged

feat: ember-client — native async RESP3 client library#297
kacy merged 1 commit into
mainfrom
feat/ember-client

Conversation

@kacy

@kacy kacy commented Feb 25, 2026

Copy link
Copy Markdown
Owner

summary

adds crates/ember-client/ — a standalone async Rust client library for ember. gives Rust users a first-class, library-friendly way to connect to ember without depending on the CLI crate.

  • Client::connect(host, port) for plain TCP
  • Client::connect_tls(host, port, &TlsClientConfig) for TLS (feature-gated)
  • client.send(&["SET", "k", "v"]) as the primary API — takes &[&str] directly
  • client.auth(password) for server authentication
  • client.disconnect() for graceful shutdown (sends QUIT before closing)
  • re-exports ember_protocol::types::Frame so callers don't need a direct ember-protocol dependency

TLS is an optional feature (tls, enabled by default) backed by rustls and tokio-rustls. disabling it removes the rustls dependency entirely — useful for embedded or server-side contexts.

what was tested

  • cargo build -p ember-client clean
  • cargo clippy -p ember-client -- -D warnings clean (zero warnings)
  • cargo test -p ember-client — 2 doc-tests pass

design considerations

named Client rather than Connection to match standard library conventions. TLS/TCP split handled by a pub(crate) Transport enum with manual AsyncRead/AsyncWrite delegation — no pin-project dependency. intentionally minimal: no connection pooling, no retry logic — those belong in a higher-level wrapper built on top.

standalone async client crate for connecting to an ember server over
TCP or TLS, sending RESP3 commands, and reading responses. provides a
clean public API (Client, ClientError, Frame) without coupling to CLI
internals. TLS support is an optional feature (enabled by default) so
embedded or server-side users can opt out of the rustls dependency.
@kacy
kacy merged commit 06ec0be into main Feb 25, 2026
@kacy
kacy deleted the feat/ember-client branch February 25, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant