Skip to content

Repository files navigation

CI

Midge

Midge 0.1.0 is an embedded Rust 2021 LSM key-value engine. It uses explicit transactions and explicit write durability policies. The crate MSRV is Rust 1.97.

The supported storage constructors are OpenOptions::in_memory(), OpenOptions::local(path), OpenOptions::cloud(...), and OpenOptions::cloud_simulated(...). Provider-backed cloud storage is a supported pre-1.0 capability, continuously qualified against the Sqrzl multi-provider emulator. CloudSimulated is a local filesystem simulation for cloud lifecycle tests; it is not a cloud service or the provider qualification environment.

Midge is single-process embedded storage. The 0.x API and operational contract may change. Deployments must qualify their credentials, IAM, network policy, provider configuration, quotas, and workload capacity.

Quick start

use std::time::Duration;
use cntryl_midge::{Engine, OpenOptions, TransactionMode, WriteOptions};

let mut engine = Engine::open(OpenOptions::local("./db").build()?)?;
let cf = engine.get_column_family("default").unwrap();
let mut tx = engine.begin_tx(cf.id(), TransactionMode::ReadWrite)?;
tx.put(b"hello".to_vec(), b"world".to_vec(), None)?;
tx.commit(WriteOptions::sync())?;
engine.shutdown(Duration::from_secs(5))?;
# Ok::<(), Box<dyn std::error::Error>>(())

The executable canonical example is examples/documented_quick_start.rs.

Reading paths

See docs/README.md for the complete current inventory.

About

Midge is an experimental embedded Rust LSM engine

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages