Redis written in Rust. Thus to not make it sound like Redis, Red-is, Rust-is, Rust-eez! TaDa!
Currently there's only a small subset of Redis that's supported. The following commands are available,
Synopsis: Set a string to be stored on a key.
Syntax: SET key value
Synopsis: Get a string stored on a key.
Syntax: GET key
Synopsis: Delete value in key(s).
Syntax: DEL key [key ...]
Synopsis: Set specified field(s) with the respective value(s) stored in a hash at the key provided.
Syntax: HSET key field value [field value ...]
Synopsis: Get the value associated with the field stored as a hash in the key provided.
Syntax: HGET key field
Synopsis: Get all the fields and values stored as a hash in the key provided.
Syntax: HGETALL key
Synopsis: Delete a particular field(s) in a hash stored at the key provided.
Syntax: HDEL key [key ...]
Synopsis: Ping the server.
Syntax: PING [message]
Synopsis: Switch protocol, though only allowing RESP2 (lol).
Syntax: HELLO [protover]
The only supported protocol are RESP2.
Here are some problem that I'm aware, might not be correct, but that's what I think is an issue in this code base.
- Storage size aren't limited, so after a while, it can just not insert new keys. Might need some kind of LRU to be implemented (?).
- Stream are copied for writing in case of any error on deserialization (see main.rs). Probably should think of how to return the
stream
on error as well.
If you found anything, please do tell me. I'm actively learning Rust. Why else would I try to rewrite Redis?
See LICENSE.