https://github.com/simonewebdesign/red
🔴 Fast key-value storage inspired by Redis
https://github.com/simonewebdesign/red
database key-value redis storage
Last synced: about 1 month ago
JSON representation
🔴 Fast key-value storage inspired by Redis
- Host: GitHub
- URL: https://github.com/simonewebdesign/red
- Owner: simonewebdesign
- License: bsd-3-clause
- Created: 2020-05-18T15:11:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-06-03T09:14:13.000Z (about 1 year ago)
- Last Synced: 2025-10-29T02:47:32.602Z (7 months ago)
- Topics: database, key-value, redis, storage
- Language: Rust
- Homepage: https://simonewebdesign.github.io/red/red/struct.State.html
- Size: 815 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔴 Red [](https://travis-ci.org/simonewebdesign/red)
> 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 (like `redis-cli`)
- `red-server` - a TCP server (like `redis-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.
## Commands
Full documentation can be found [here](https://simonewebdesign.github.io/red/red/struct.State.html). List of supported commands:
* [`GET`](#get-key)
* [`SADD`](#sadd-member)
* [`SET`](#set-key-value)
* [`SMEMBERS`](#smembers)
* [`SREM`](#srem-member)
### GET key
Get the value of key. If the key does not exist the special value `nil` is returned.
### SADD member
Add the member to the set. If the member is already in the set, it will be ignored.
### SET key value
Set key to hold the string `value`. If key already holds a value, it is overwritten.
### SMEMBERS
Returns all the members of the set.
### SREM member
Remove the specified member from the set. If the member is not in the set, it will be ignored.
## Installation
TODO: add crate
### Compile from source
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