https://github.com/abdus/rust-redis
A Redis server implementation in Rust
https://github.com/abdus/rust-redis
redis redis-client redis-server rust
Last synced: 2 months ago
JSON representation
A Redis server implementation in Rust
- Host: GitHub
- URL: https://github.com/abdus/rust-redis
- Owner: abdus
- Created: 2023-11-18T20:16:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-02T10:15:05.000Z (over 1 year ago)
- Last Synced: 2025-01-30T10:15:30.242Z (4 months ago)
- Topics: redis, redis-client, redis-server, rust
- Language: Rust
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Redis Implementation
This Rust project implements a simple RESP2 (REdis Serialization Protocol 2)
server. RESP2 is a binary-safe protocol used by Redis for communication between
clients and servers. The server listens on the specified IP address and port
(0.0.0.0:6379 by default) and handles basic RESP2 commands such as PING and
GET.## Table of Contents
- [Getting Started](#getting-started)
- [Usage](#usage)
- [File Structure](#file-structure)
- [Contributing](#contributing)
- [License](#license)## Getting Started
To get started with the RESP2 server, ensure you have Rust installed on your
system. You can install Rust by following the instructions on the [official
Rust website](https://www.rust-lang.org/).Clone the repository:
```bash
git clone https://github.com/abdus/redis-server.git
cd redis-server
```Build and run the server:
```rust
cargo run
```By default, the server will listen on 0.0.0.0:6379. You can modify the IP
constant in the main.rs file to change the IP address and port.## Usage
Connect to the RESP2 server using a Redis client or any RESP2-compatible tool.
The server currently supports the PING command. For any other command, it will
respond with an error indicating that the command is not implemented.Example using the redis-cli tool:
```bash
$ redis-cli -p 6379
127.0.0.1:6379>PING
Hello from the Other Side
```https://github.com/abdus/rust-redis/assets/32123917/f8499757-1051-4636-95c5-13033d2df458