Fast, reliable key-value storage. Inspired by Redis, built with Rust.
Red has a similar interface to Redis. It has two executables:
red
- an interactive shell (likeredis-cli
)red-server
- a TCP server (likeredis-server
)
The shell is a REPL: it expects you to enter one command at a time.
The server, on the other hand, can handle multiple connections and multiple commands per connection. Commands must be separated by a newline and will be processed in a single step, as soon as EOF is reached. Replies are queued and will also be sent together.
Full documentation can be found here. List of supported commands:
Get the value of key. If the key does not exist the special value nil
is returned.
Add the member to the set. If the member is already in the set, it will be ignored.
Set key to hold the string value
. If key already holds a value, it is overwritten.
Returns all the members of the set.
Remove the specified member from the set. If the member is not in the set, it will be ignored.
TODO: add crate
Clone the repo, then compile the project with:
rustc src/main.rs -o red # Compile the CLI
rustc src/server.rs -o red-server # Compile the TCP server
Alternatively, you can start an interactive shell with:
cargo run
Generate docs with:
cargo doc