RocksMap
A high-level, type-safe abstraction over RocksDB in Rust, offering ergonomic map-like APIs with zero unsafe code and clean serialization defaults.
✨ Features
Core Features
- Type-safe: Full generics support with compile-time type checking
- Zero unsafe code: Built entirely on safe Rust abstractions
- Ergonomic API: Map-like interface (
get,put,delete,iter) - Serialization: Pluggable codec system with bincode/serde defaults
- Column families: Namespaced data organization
- Comprehensive error handling: Rich error types with context
Advanced Features Overview
- Batch operations: Atomic multi-key transactions
- TTL support: Automatic key expiration with compaction
- Range queries: Efficient key range and prefix scanning
- Secondary indexes: Optional indexing layer for complex queries
- CLI tooling: Full-featured command-line interface
- Diagnostics: Database analysis, integrity checks, and benchmarking
Usage
use ;
use ;
🛠️ CLI Tool
RocksMap includes a powerful CLI for database management and diagnostics:
# Install the CLI
# Basic operations
# Database administration
# Data import/export
# Diagnostics and analysis
# Interactive shell
📚 API Documentation
Basic Operations
use RocksMap;
// Open a database
let mut db = open?;
// Put/Get/Delete
db.put?;
let value = db.get?;
db.delete?;
// Iteration
for result in db.iter
Advanced Features Code Examples
// Batch operations
let mut batch = db.batch;
batch.put?;
batch.put?;
batch.delete?;
batch.write?;
// TTL support
db.put_with_ttl?;
// Range queries
for result in db.range
// Prefix scanning
for result in db.prefix_scan
// Column families
let mut cf = db.column_family?;
cf.put?;
License
This project is licensed under the terms of the MIT License.