Loading repository data…
Loading repository data…
abbycin / repository
A fast, cross-platform embedded key-value storage engine with ACID, MVCC, and flash-optimized storage
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Mace is a high-performance, embedded key-value storage engine written in Rust. It is designed to combine the predictable read performance of B+ Trees with the high write throughput of LSM Trees.
enable_compression (default: false).cargo add mace-kv
The following example demonstrates basic transaction management and data retrieval:
use mace::{BucketOptions, Mace, OpCode, Options};
fn main() -> Result<(), OpCode> {
// 1. Initialize the storage
let opts = Options::new("./data_dir");
let db = Mace::new(opts.validate().unwrap())?;
let bkt = db.new_bucket("tmp", BucketOptions::default())?;
// 2. Perform a write transaction
let txn = bkt.begin()?;
txn.put("moha", "+1s")?;
txn.commit()?;
// 3. Read data using a consistent view
let view = bkt.view()?;
let value = view.get("moha")?;
println!("moha => {:?}", std::str::from_utf8(value.slice()));
// 4. Remove data
let txn = bkt.begin()?;
txn.del("moha")?;
txn.commit()?;
Ok(())
}
Detailed usage can be found in examples/demo.rs.
Recent complete benchmark results: https://o2c.fun/benchmark.html
For detailed performance analysis and comparison with other engines, refer to the kv_bench repository.
xfs (/dev/nvme1n1p4, mounted at /nvme)./scripts/prod_test.sh all 8Mace uses cargo-fuzz for stateful lifecycle fuzzing.
The goal here is not "feed invalid bytes into a decoder and see whether it crashes". For this project, the more important question is whether Mace's own write, checkpoint, GC, reopen, and bucket lifecycle can produce state that later becomes unreadable, invisible, or inconsistent for lagging views and recovery.
The focus is on lifecycle closure:
Detailed usage, targets, and replay commands are in fuzz/README.md.
Architecture and crash-safety notes are in docs/design.md.
mace is not stable yet. Storage format and APIs can change between minor versions.
If you want to join the discussion, you are welcome to join the QQ group: 1023032506.
This project is licensed under the MIT License - see the LICENSE file for details.