docs.rs failed to build eloqstore-1.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
EloqStore Rust FFI
Rust bindings for EloqStore, a high-performance embedded key-value database written in C++.
Overview
EloqStore Rust FFI provides two ways to interact with EloqStore:
- RocksDB-style API - Simple, familiar interface with
get(),put(),delete(), etc. - Request Trait API - Type-safe, composable API using Rust traits to simulate C++ polymorphism
Quick Start
use ;
API Reference
EloqStore
RocksDB-style Operations
Request Trait API
For advanced use cases, use the Request trait pattern:
use ;
// Read operations
let req = new;
let resp = store.exec_sync?;
// Write operations with chaining
let req = new
.put
.put
.delete;
store.exec_sync?;
// Scan with options
let req = new
.range
.pagination;
let resp = store.exec_sync?;
// Floor operation
let req = new;
let resp = store.exec_sync?;
Options
let mut opts = new?;
// Configure thread count
opts.set_num_threads;
// Configure buffer pool size (in bytes)
opts.set_buffer_pool_size; // 256MB
// Configure data page size (in bytes)
opts.set_data_page_size?;
// Add store paths
opts.add_store_path?;
// Enable data append mode
opts.set_data_append_mode;
// Enable compression
opts.set_enable_compression;
// Validate options
assert!;
Error Handling
use KvError;
match store.get
Building
Prerequisites
- Rust 1.70 or later
- CMake 3.16 or later
- C++ compiler with C++17 support
- Python 3 (for build scripts)
Build
Run Tests
# Tests must run serially due to C++ global pointer
Architecture
The project is structured as a Cargo workspace with two crates:
eloqstore-sys
Low-level FFI bindings to the C++ EloqStore library. This crate:
- Contains only
extern "C"declarations - Uses CMake to build the C++ source
- Provides safe wrappers for C types
eloqstore
High-level Rust API. This crate:
- Implements the
RequestandResponsetraits - Provides both RocksDB-style and trait-based APIs
- Handles memory management and error conversion
Limitations
- Serial Execution: Due to C++ global pointer usage, only one EloqStore instance can be active at a time. Tests must run with
--test-threads=1. - Build Time: Initial build requires compiling ~31MB of C++ source (Abseil, Boost, AWS SDK, etc.)
License
EloqStore Rust FFI is licensed under the same license as EloqStore. See the EloqStore repository for details.