| Crates.io | veddb-client |
| lib.rs | veddb-client |
| version | 0.0.12 |
| created_at | 2025-10-02 07:34:40.849396+00 |
| updated_at | 2025-10-02 07:40:55.535832+00 |
| description | Official Rust client library and CLI for VedDB - Fast, lightweight in-memory key-value database |
| homepage | https://github.com/Mihir-Rabari/ved-db-rust-client |
| repository | https://github.com/Mihir-Rabari/ved-db-rust-client |
| max_upload_size | |
| id | 1863979 |
| size | 97,678 |
Official Rust client library and CLI tool for VedDB Server
This repository provides both a Rust client library and a command-line interface (CLI) for interacting with VedDB Server. Built with async/await and designed for high performance.
What's included:
veddb-client) - Async client for embedding in your applicationsveddb-cli.exe) - Command-line interface for interactive use
VedDB CLI is currently tested and supported on Windows. You can download the pre-built executable:
Option 1: Download from Website
.exeOption 2: GitHub Releases
veddb-cli-v0.0.11-windows.exe# Ping the server
veddb-cli.exe ping
# Set a key-value pair
veddb-cli.exe kv set name "John Doe"
# Get a value
veddb-cli.exe kv get name
# List all keys
veddb-cli.exe kv list
# Delete a key
veddb-cli.exe kv del name
veddb-cli.exe [OPTIONS] <COMMAND>
Options:
-s, --server <SERVER> Server address [default: 127.0.0.1:50051]
-f, --format <FORMAT> Output format [default: table] [values: table, json, raw]
-v, --verbose Enable verbose output
-h, --help Print help
-V, --version Print version
veddb-cli.exe kv set <KEY> <VALUE>
Examples:
veddb-cli.exe kv set name "Alice"
veddb-cli.exe kv set age 25
veddb-cli.exe kv set city "New York"
veddb-cli.exe kv get <KEY>
Example output:
+------+-------+
| Key | Value |
+------+-------+
| name | Alice |
+------+-------+
veddb-cli.exe kv del <KEY>
veddb-cli.exe kv list
Example output:
+------+
| Keys |
+------+
| name |
| age |
| city |
+------+
Check server connectivity:
veddb-cli.exe ping
Example output:
+--------+---------+
| Status | Latency |
+--------+---------+
| pong | 0 ms |
+--------+---------+
Table Format (Default)
veddb-cli.exe kv get name
JSON Format
veddb-cli.exe -f json kv get name
Raw Format
veddb-cli.exe -f raw kv get name
Add to your Cargo.toml:
[dependencies]
veddb-client = "0.0.11"
tokio = { version = "1", features = ["full"] }
use veddb_client::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Connect to server
let client = Client::connect("127.0.0.1:50051").await?;
// Ping server
client.ping().await?;
println!("Server is alive!");
// Set a key
client.set("name", "Alice").await?;
// Get a key
let value = client.get("name").await?;
println!("Value: {}", String::from_utf8_lossy(&value));
// List all keys
let keys = client.list_keys().await?;
println!("Keys: {:?}", keys);
// Delete a key
client.delete("name").await?;
Ok(())
}
use veddb_client::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create client with connection pool
let client = Client::with_pool_size("127.0.0.1:50051", 10).await?;
// Use client (connections are automatically managed)
client.set("key", "value").await?;
Ok(())
}
Prerequisites:
git clone https://github.com/Mihir-Rabari/ved-db-rust-client.git
cd ved-db-rust-client
cargo build --release
CLI binary will be at: target\release\veddb-cli.exe
cargo test
cargo build --release --bin veddb-cli
The client implements the VedDB binary protocol:
MIT License - see LICENSE for details.
Contributions welcome! Please open an issue or PR on GitHub.
Built with β€οΈ in Rust