Crates.io | mudb |
lib.rs | mudb |
version | 0.1.1 |
created_at | 2025-09-05 10:58:17.974473+00 |
updated_at | 2025-09-05 11:50:45.32423+00 |
description | A RESP-based in-memory cache server written in Rust, inspired by Redis. Includes a CLI client. |
homepage | |
repository | |
max_upload_size | |
id | 1825350 |
size | 86,374 |
MuDB provides two binaries:
ping
, set
, get
, etc.mudb --port 6380
mudb-cli ping --host 127.0.0.1 --port 6380
mudb-cli set --host 127.0.0.1 --port 6380 mykey myvalue
mudb-cli get --host 127.0.0.1 --port 6380 mykey
mudb-cli lpush --host 127.0.0.1 --port 6380 mylist item1
mudb-cli lrange --host 127.0.0.1 --port 6380 mylist 0 -1
mudb --port 6380
) before using the CLI client.~/.cargo/bin
) is in your PATH.
You can add it with:
export PATH="$HOME/.cargo/bin:$PATH"
mudb
for the server and mudb-cli
for client commands. Do not run CLI commands with the server binary.After publishing, users can install the CLI client globally with:
cargo install mudb-cli
This will make the mudb-cli
command available anywhere on your system.
Example usage:
mudb-cli ping --host 127.0.0.1 --port 6380
mudb
Command AnywhereAfter publishing, you can install MuDB globally with:
cargo install mudb
For local development, you can install the binary from your project directory:
cargo install --path .
This will place the mudb
binary in your Cargo bin directory (usually ~/.cargo/bin
).
Make sure this directory is in your system's PATH:
export PATH="$HOME/.cargo/bin:$PATH"
Now you can run mudb
from anywhere:
mudb --port 6380
A RESP-based in-memory cache server written in Rust, inspired by Redis. Includes a CLI client for easy interaction.
# Clone the repository
$ git clone https://github.com/yash-jain-1/muDB.git
$ cd muDB
# Build and run the server
$ cargo run -- --port 6380
You should see a colorful MuDB bull banner and server logs.
You can install MuDB directly from crates.io (after publishing):
cargo install mudb
Or build from source:
# Clone the repository
$ git clone https://github.com/yash-jain-1/muDB.git
$ cd muDB
# Build and run the server
$ cargo run -- --port 6380
You should see a colorful MuDB bull banner and server logs.
# Build the CLI tool
$ cd cli
$ cargo build --release
# Example commands
$ ./target/release/mudb-cli ping --host 127.0.0.1 --port 6380
$ ./target/release/mudb-cli set mykey myvalue --host 127.0.0.1 --port 6380
$ ./target/release/mudb-cli get mykey --host 127.0.0.1 --port 6380
$ ./target/release/mudb-cli lpush mylist item1 --host 127.0.0.1 --port 6380
$ ./target/release/mudb-cli lrange mylist 0 --host 127.0.0.1 --port 6380 -- -1
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)cargo fmt
cargo clippy
for lint checks$ cargo test
A sample Dockerfile is provided. To build and run with Docker:
$ docker build -t mudb .
$ docker run -p 6380:6380 mudb
MIT
Enjoy hacking on MuDB! 🐂