It's like Redis but a bit rusty...
This is a simple in-memory key-value store written in Rust. It's somewhat compatible with Redis via the RESP protocol, but it's not a drop-in replacement. A lot of commands are missing and stuff might not work as expected.
Note
While it's technically possible to run crabdis in production, it's not recommended, use at your own risk!
I like tinkering with stuff I use and Redis is a great tool. It was started when the License fiasco happened and I wanted to write my own Redis-compatible server in Rust. This project works with notable clients like ioredis and Bun.
Important
Bun support is only available since version 0.1.25 of crabdis due to incorrect RESP3 support in earlier versions. As always, use the latest version of crabdis and bun to get the best experience.
You can find binaries on the releases page. Or you can build it yourself with cargo build --release.
If you want to install it with cargo, you can do so with cargo install crabdis.
There is also a Docker image available on Docker Hub.
By default, crabdis will listen on all addresses on port 6379. This is the same as running crabdis --address :: --port 6379. This has been chosen because Railway's internal networking used to be IPv6 only.
crabdis- Basic RESP protocol implementation
- GET, SET, DEL, EXISTS, KEYS, FLUSHDB
- COMMAND / COMMAND DOCS (so ioredis works)
- SET arguments (EX, PX, NX, XX) + SETEX, PSETEX
- Hash Command family (HGETALL, HSET)
- Pub/Sub support (PUBLISH, SUBSCRIBE, UNSUBSCRIBE)
- Additional commands (INCR, MGET, MSET, TYPE, SCAN, SELECT, RENAMENX, INFO, HELLO)
- Persistence
- More Hash commands (HGET, HDEL, etc.)
- List commands
- Set commands
- Sorted Set commands
Below are micro-benchmarks for core Value operations and RESP serialization/deserialization (run with cargo bench).
It's pretty fast actually.
This project is licensed under the MIT License.