alopex-core

Crates.ioalopex-core
lib.rsalopex-core
version0.4.2
created_at2025-12-17 09:35:20.764364+00
updated_at2026-01-22 04:36:00.999347+00
descriptionCore storage engine for Alopex DB - LSM-tree, columnar storage, and vector index
homepage
repositoryhttps://github.com/alopex-db/alopex
max_upload_size
id1989831
size1,163,476
あそぴテック (asopitech)

documentation

README

alopex-core

Core storage engine for Alopex DB - a unified database engine that scales from embedded to distributed.

Features

  • LSM-Tree Storage: High-throughput key-value storage with write-ahead logging
  • Columnar Storage: Efficient analytical queries with column-oriented data layout
  • Vector Index: Native vector similarity search with HNSW and flat index support
  • Multiple Compression: Snappy (default), Zstd, LZ4 compression options
  • Memory Mapping: Efficient file I/O with mmap support
  • WASM Support: Optional WebAssembly target with IndexedDB backend

Installation

[dependencies]
alopex-core = "0.3"

Optional Features

[dependencies]
alopex-core = { version = "0.3", features = ["compression-zstd", "compression-lz4"] }
Feature Description
compression-zstd Zstandard compression support
compression-lz4 LZ4 compression support
checksum-xxh64 XXHash64 checksum
wasm-indexeddb WebAssembly with IndexedDB backend
memory-profiling Memory profiling tools

Quick Start

use alopex_core::lsm::LsmTree;
use alopex_core::config::LsmConfig;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create LSM-Tree with default config
    let config = LsmConfig::default();
    let tree = LsmTree::open("./data", config)?;

    // Write data
    tree.put(b"key1", b"value1")?;
    tree.put(b"key2", b"value2")?;

    // Read data
    if let Some(value) = tree.get(b"key1")? {
        println!("Found: {:?}", value);
    }

    // Flush to disk
    tree.flush()?;

    Ok(())
}

Architecture

alopex-core
├── lsm/          # LSM-Tree implementation
│   ├── memtable  # In-memory sorted table
│   ├── sstable   # Sorted string table (on-disk)
│   └── wal       # Write-ahead log
├── columnar/     # Columnar storage engine
├── vector/       # Vector index (HNSW, Flat)
└── kv/           # Key-value abstraction layer

License

Apache-2.0

Commit count: 303

cargo fmt