reredis is a reimplementation of Redis (server) in Rust programming language. The current equivalent version of Redis is 1.x - 2.x. It supports Linux and MacOS(it depends on Unix API like fork, so Windows version is not available now).
Licensed under BSD 3-Clause.
Async version of reredis is coming in async branch! And there is blogs on this project here!
reredis can be compiled on all *nix systems that supports Rust toolchain(but tested only on Linux and MacOS).
It requires Rust(>= 1.37.0) to compile. To install Rust, see this.
The build command is
%cargo build --releaseand the executable is located at ./target/release/reredis
After building Redis, it is a good idea to test it using:
%cargo test # This is unit testsand
%cargo test --test server_test -- --ignored --nocapture # This is integration testsAlternatively, you can use the Makefile, which is just a wrapper of the former commands.
%maketo build.
%make testto do all tests.
The command is identical to Redis. Like
%reredis # start on 127.0.0.1:6379and
%reredis --bind 0.0.0.0 --port 9090 # binds on all ip address and port 9090and
%reredis example.conf # configured by example.confOther supported configuration are listed here
The usage of the commands can be looked up here.
- get
- set
- setnx
- del
- exists
- incr
- decr
- mget
- rpush
- lpush
- lpop
- rpop
- llen
- lindex
- lset
- lrange
- ltrim
- lrem
- sadd
- srem
- smove
- sismember
- scard
- spop
- sinter
- sinterstore
- sunion
- sunionstore
- sdiff
- sdiffstore
- smembers
- incrby
- decrby
- getset
- randomkey
- select
- move
- rename
- renamenx
- expire
- keys
- dbsize
- auth
- ping
- echo
- save
- bgsave
- shutdown
- lastsave
- type
- sync
- flushdb
- flushall
- sort
- info
- monitor
- ttl
- slaveof
- object encoding
reredis is a reimplementation of Redis, and its protocol is compatible with Redis Protocol(RESP). But the current version of .rdb file is not compatible with Redis, because the format of ziplist and intset is slightly different. I'm still working on it.
Since the protocol is compatible with Redis. All clients of Redis can be used with reredis, like redis-rs in Rust. There is currently on implementation of redis-cli in my project, but I'm working on it.
