Skip to content

Commit ffb8004

Browse files
authored
docs: update readme (#6)
1 parent 5b5e4a0 commit ffb8004

File tree

1 file changed

+54
-6
lines changed

1 file changed

+54
-6
lines changed

README.md

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# redis-async
22

3-
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].
4-
Inspired by [mini-redis][2].
3+
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].
54

65
## Usage
76

@@ -38,7 +37,36 @@ More examples can be found in the [examples](./examples/) directory.
3837

3938
### Using the CLI
4039

41-
TBD. Not available yet.
40+
You can install the CLI as a binary or run it with [Cargo][3].
41+
42+
To install as a binary into `~/.cargo/bin`:
43+
44+
```shell
45+
> cargo install --path .
46+
```
47+
48+
Then you can run it:
49+
50+
```shell
51+
> redis-async-cli
52+
```
53+
54+
To build and run without installation:
55+
56+
```shell
57+
> cargo build --release --bin redis-async-cli
58+
```
59+
60+
Then you can it:
61+
62+
```shell
63+
> ./target/release/redis-async-cli
64+
```
65+
66+
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:
67+
68+
+ Interactive mode:
69+
+ Command line mode:
4270

4371
## TLS/SSL
4472

@@ -48,13 +76,15 @@ TBD. Not available yet.
4876

4977
TBD. Not available yet.
5078

79+
## RESP2/RESP3
80+
5181
## Supported commands
5282

5383
This library is more on prototype. More commands will be added later on.
5484

55-
+ PING
56-
+ GET
57-
+ SET
85+
+ [PING][4]
86+
+ [GET][5]
87+
+ [SET][6]
5888
+ DEL
5989
+ EXISTS
6090
+ EXPIRE
@@ -69,6 +99,20 @@ This library is more on prototype. More commands will be added later on.
6999

70100
## Development
71101

102+
### Local build
103+
104+
To build the lib:
105+
106+
```shell
107+
> cargo build --lib
108+
```
109+
110+
To build the CLI:
111+
112+
```shell
113+
> cargo build --bin redis-async-cli
114+
```
115+
72116
TBD. Thinking of which may people prefer if they don't want to install Redis on their local.
73117

74118
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).
85129

86130
[1]: https://tokio.rs/
87131
[2]: https://github.com/tokio-rs/mini-redis
132+
[3]: https://github.com/rust-lang/cargo
133+
[4]: https://redis.io/docs/latest/commands/ping/
134+
[5]: https://redis.io/docs/latest/commands/get/
135+
[6]: https://redis.io/docs/latest/commands/set/

0 commit comments

Comments
 (0)