13 releases

0.1.13 Sep 10, 2024
0.1.12 Aug 26, 2024
0.1.10 Jul 26, 2024
0.1.8 Apr 16, 2024
0.1.6 Mar 31, 2024

#895 in Database interfaces

Download history 1/week @ 2024-07-01 113/week @ 2024-07-15 139/week @ 2024-07-22 19/week @ 2024-07-29 263/week @ 2024-08-26 130/week @ 2024-09-09 9/week @ 2024-09-16 7/week @ 2024-09-23 35/week @ 2024-09-30 1/week @ 2024-10-07 45/week @ 2024-10-14

88 downloads per month

MIT license

69KB
2K SLoC

crabdis

It's like Redis but a bit rusty...

What?

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.

Please don't use this in production. Or do, I'm not your mom. But don't blame me if it eats your data.

Why?

I wanted to write Redis but multi-threaded and in Rust. This is the result. Works? Kinda. Is it good? Maybe. Is it fast? Yes.

Installation

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.

Usage

crabdis

TODO / Missing Features

  • Basic RESP protocol implementation
  • GET, SET, DEL, EXISTS, KEYS, FLUSHDB
  • COMMAND / COMMAND DOCS (so ioredis works)
  • SET arguments (EX, PX, NX, XX) + SETEX, PSETEX
  • Persistence
  • Hash Command family

This will start the server on 127.0.0.1:6379. You can change the address and port with the --address and --port flags.

License

This project is licensed under the MIT License.

Dependencies

~4–10MB
~94K SLoC