A lightweight Redis-compatible server implementation written in Rust using async/await with Tokio.
- In-memory key-value store
- Support for basic Redis commands (SET, GET)
- RESP (Redis Serialization Protocol) protocol support
- Asynchronous I/O using Tokio
- Concurrent client handling
- Basic INFO and COMMAND support
- Rust 1.75 or later
- Cargo (Rust's package manager)
git clone https://github.com/tennix/rdb.git
cd rdb
cargo build --release
cargo run
The server will start listening on 127.0.0.1:6379
(default Redis port).
You can connect to the server using any Redis client. For example, using redis-cli
:
redis-cli
SET key value
- Store a key-value pairGET key
- Retrieve the value for a given keyINFO
- Get server informationCOMMAND
- Get command information (minimal implementation)
> INFO
> SET mykey "Hello World"
OK
> GET mykey
"Hello World"
> SAVE
Run the test suite with:
cargo test
This project is open source and available under the MIT License.
The code is mostly written by AI. I want to investigate how far can AI go. So please DO NOT contribute to this repo at the moment.