From d3aedddfddea42f06b624e92ddab85c5e097603e Mon Sep 17 00:00:00 2001 From: Aden-Q Date: Thu, 27 Mar 2025 20:52:06 -0500 Subject: [PATCH] docs: update readme --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 85538a7..97cd261 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # redis-async -An asynchronous Redis client library and a Redis CLI built in Rust, compliant with RES (Redis Serialization Protocol) 2 and 3, built with [Tokio][1]. -Inspired by [mini-redis][2]. +An asynchronous Redis client library and a Redis CLI built in Rust, compatible with RES (Redis Serialization Protocol) version 2 and 3, built with [Tokio][1]. Inspired by [mini-redis][2]. ## Usage @@ -38,7 +37,36 @@ More examples can be found in the [examples](./examples/) directory. ### Using the CLI -TBD. Not available yet. +You can install the CLI as a binary or run it with [Cargo][3]. + +To install as a binary into `~/.cargo/bin`: + +```shell +> cargo install --path . +``` + +Then you can run it: + +```shell +> redis-async-cli +``` + +To build and run without installation: + +```shell +> cargo build --release --bin redis-async-cli +``` + +Then you can it: + +```shell +> ./target/release/redis-async-cli +``` + +To use the CLI, you first need to run a Redis server. Then you can run this CLI in either interactive mode or command line mode: + ++ Interactive mode: ++ Command line mode: ## TLS/SSL @@ -48,13 +76,15 @@ TBD. Not available yet. TBD. Not available yet. +## RESP2/RESP3 + ## Supported commands This library is more on prototype. More commands will be added later on. -+ PING -+ GET -+ SET ++ [PING][4] ++ [GET][5] ++ [SET][6] + DEL + EXISTS + EXPIRE @@ -69,6 +99,20 @@ This library is more on prototype. More commands will be added later on. ## Development +### Local build + +To build the lib: + +```shell +> cargo build --lib +``` + +To build the CLI: + +```shell +> cargo build --bin redis-async-cli +``` + TBD. Thinking of which may people prefer if they don't want to install Redis on their local. Also due to gotchas from different RESP versions and Redis versions. A local dev may be necessary to for reproducible build and test environment. @@ -85,3 +129,7 @@ The project is licensed under the [MIT license](./LICENSE). [1]: https://tokio.rs/ [2]: https://github.com/tokio-rs/mini-redis +[3]: https://github.com/rust-lang/cargo +[4]: https://redis.io/docs/latest/commands/ping/ +[5]: https://redis.io/docs/latest/commands/get/ +[6]: https://redis.io/docs/latest/commands/set/