Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 54 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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.
Expand All @@ -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/